@unispechq/unispec-core 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generated-schemas.js +57 -152
- package/dist/cjs/validator/semantic-validator.js +0 -21
- package/dist/generated-schemas.d.ts +54 -164
- package/dist/generated-schemas.js +57 -152
- package/dist/types/index.d.ts +10 -14
- package/dist/validator/semantic-validator.js +0 -21
- package/package.json +2 -2
|
@@ -114,7 +114,7 @@ exports.GENERATED_SCHEMAS = {
|
|
|
114
114
|
"properties": {
|
|
115
115
|
"weight": {
|
|
116
116
|
"type": "object",
|
|
117
|
-
"description": "Test weights by
|
|
117
|
+
"description": "Test weights by operation.",
|
|
118
118
|
"additionalProperties": {
|
|
119
119
|
"type": "integer",
|
|
120
120
|
"minimum": 1
|
|
@@ -157,13 +157,6 @@ exports.GENERATED_SCHEMAS = {
|
|
|
157
157
|
},
|
|
158
158
|
"expect": {
|
|
159
159
|
"$ref": "#/$defs/TestExpect"
|
|
160
|
-
},
|
|
161
|
-
"tags": {
|
|
162
|
-
"type": "array",
|
|
163
|
-
"description": "Tags for grouping and filtering tests.",
|
|
164
|
-
"items": {
|
|
165
|
-
"type": "string"
|
|
166
|
-
}
|
|
167
160
|
}
|
|
168
161
|
},
|
|
169
162
|
"additionalProperties": false
|
|
@@ -504,6 +497,9 @@ exports.GENERATED_SCHEMAS = {
|
|
|
504
497
|
"items": {
|
|
505
498
|
"$ref": "#/$defs/SecurityRequirement"
|
|
506
499
|
}
|
|
500
|
+
},
|
|
501
|
+
"rateLimit": {
|
|
502
|
+
"$ref": "#/$defs/RateLimit"
|
|
507
503
|
}
|
|
508
504
|
},
|
|
509
505
|
"additionalProperties": false
|
|
@@ -686,6 +682,9 @@ exports.GENERATED_SCHEMAS = {
|
|
|
686
682
|
"items": {
|
|
687
683
|
"$ref": "#/$defs/SecurityRequirement"
|
|
688
684
|
}
|
|
685
|
+
},
|
|
686
|
+
"rateLimit": {
|
|
687
|
+
"$ref": "#/$defs/RateLimit"
|
|
689
688
|
}
|
|
690
689
|
},
|
|
691
690
|
"additionalProperties": false
|
|
@@ -952,6 +951,52 @@ exports.GENERATED_SCHEMAS = {
|
|
|
952
951
|
},
|
|
953
952
|
"additionalProperties": false
|
|
954
953
|
},
|
|
954
|
+
"RateLimit": {
|
|
955
|
+
"type": "object",
|
|
956
|
+
"description": "Rate limiting configuration for the service.",
|
|
957
|
+
"properties": {
|
|
958
|
+
"inherit": {
|
|
959
|
+
"type": "boolean",
|
|
960
|
+
"description": "Whether to inherit from parent rate limit configuration. When true, only specified fields override parent values.",
|
|
961
|
+
"default": false
|
|
962
|
+
},
|
|
963
|
+
"requestsPerMinute": {
|
|
964
|
+
"type": "integer",
|
|
965
|
+
"minimum": 0,
|
|
966
|
+
"description": "Maximum requests per minute."
|
|
967
|
+
},
|
|
968
|
+
"requestsPerHour": {
|
|
969
|
+
"type": "integer",
|
|
970
|
+
"minimum": 0,
|
|
971
|
+
"description": "Maximum requests per hour."
|
|
972
|
+
},
|
|
973
|
+
"requestsPerDay": {
|
|
974
|
+
"type": "integer",
|
|
975
|
+
"minimum": 0,
|
|
976
|
+
"description": "Maximum requests per day."
|
|
977
|
+
},
|
|
978
|
+
"burstLimit": {
|
|
979
|
+
"type": "integer",
|
|
980
|
+
"minimum": 0,
|
|
981
|
+
"description": "Maximum burst requests allowed."
|
|
982
|
+
},
|
|
983
|
+
"perUser": {
|
|
984
|
+
"type": "boolean",
|
|
985
|
+
"description": "Whether rate limiting is applied per user.",
|
|
986
|
+
"default": false
|
|
987
|
+
},
|
|
988
|
+
"perApiKey": {
|
|
989
|
+
"type": "boolean",
|
|
990
|
+
"description": "Whether rate limiting is applied per API key.",
|
|
991
|
+
"default": false
|
|
992
|
+
},
|
|
993
|
+
"customKey": {
|
|
994
|
+
"type": "string",
|
|
995
|
+
"description": "Custom key for rate limiting (e.g., IP address, organization ID)."
|
|
996
|
+
}
|
|
997
|
+
},
|
|
998
|
+
"additionalProperties": false
|
|
999
|
+
},
|
|
955
1000
|
"Audit": {
|
|
956
1001
|
"type": "object",
|
|
957
1002
|
"description": "Audit configuration for compliance.",
|
|
@@ -1027,11 +1072,6 @@ exports.GENERATED_SCHEMAS = {
|
|
|
1027
1072
|
"description": "Semantic version string (SemVer).",
|
|
1028
1073
|
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
|
|
1029
1074
|
},
|
|
1030
|
-
"Tag": {
|
|
1031
|
-
"type": "string",
|
|
1032
|
-
"description": "Tag for grouping operations and resources.",
|
|
1033
|
-
"pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
|
|
1034
|
-
},
|
|
1035
1075
|
"SecurityScheme": {
|
|
1036
1076
|
"type": "object",
|
|
1037
1077
|
"discriminator": {
|
|
@@ -1300,13 +1340,6 @@ exports.GENERATED_SCHEMAS = {
|
|
|
1300
1340
|
"description": {
|
|
1301
1341
|
"$ref": "./common.schema.json#/$defs/Description"
|
|
1302
1342
|
},
|
|
1303
|
-
"tags": {
|
|
1304
|
-
"type": "array",
|
|
1305
|
-
"description": "Tags for grouping operations.",
|
|
1306
|
-
"items": {
|
|
1307
|
-
"$ref": "./common.schema.json#/$defs/Tag"
|
|
1308
|
-
}
|
|
1309
|
-
},
|
|
1310
1343
|
"deprecated": {
|
|
1311
1344
|
"type": "boolean",
|
|
1312
1345
|
"description": "Marks the operation as deprecated.",
|
|
@@ -1410,17 +1443,10 @@ exports.GENERATED_SCHEMAS = {
|
|
|
1410
1443
|
"name": {
|
|
1411
1444
|
"$ref": "./common.schema.json#/$defs/Identifier"
|
|
1412
1445
|
},
|
|
1413
|
-
"
|
|
1446
|
+
"description": {
|
|
1414
1447
|
"type": "string",
|
|
1415
1448
|
"description": "Short, human-readable summary of the route."
|
|
1416
1449
|
},
|
|
1417
|
-
"tags": {
|
|
1418
|
-
"type": "array",
|
|
1419
|
-
"description": "Tags for grouping operations.",
|
|
1420
|
-
"items": {
|
|
1421
|
-
"$ref": "./common.schema.json#/$defs/Tag"
|
|
1422
|
-
}
|
|
1423
|
-
},
|
|
1424
1450
|
"deprecated": {
|
|
1425
1451
|
"type": "boolean",
|
|
1426
1452
|
"description": "Marks the route as deprecated.",
|
|
@@ -1430,12 +1456,9 @@ exports.GENERATED_SCHEMAS = {
|
|
|
1430
1456
|
"type": "string",
|
|
1431
1457
|
"description": "Human-readable reason for deprecation."
|
|
1432
1458
|
},
|
|
1433
|
-
"description": {
|
|
1434
|
-
"$ref": "./common.schema.json#/$defs/Description"
|
|
1435
|
-
},
|
|
1436
1459
|
"path": {
|
|
1437
1460
|
"type": "string",
|
|
1438
|
-
"description": "URL path template, e.g. /users
|
|
1461
|
+
"description": "URL path template, e.g. /users/:id."
|
|
1439
1462
|
},
|
|
1440
1463
|
"method": {
|
|
1441
1464
|
"type": "string",
|
|
@@ -1735,17 +1758,6 @@ exports.GENERATED_SCHEMAS = {
|
|
|
1735
1758
|
"version": {
|
|
1736
1759
|
"$ref": "./common.schema.json#/$defs/Version"
|
|
1737
1760
|
},
|
|
1738
|
-
"tags": {
|
|
1739
|
-
"type": "array",
|
|
1740
|
-
"description": "Tags for grouping and categorizing the service.",
|
|
1741
|
-
"items": {
|
|
1742
|
-
"$ref": "./common.schema.json#/$defs/Tag"
|
|
1743
|
-
}
|
|
1744
|
-
},
|
|
1745
|
-
"baseUrl": {
|
|
1746
|
-
"$ref": "./common.schema.json#/$defs/Url",
|
|
1747
|
-
"description": "Base URL for the service. Used as the default prefix for all protocol endpoints."
|
|
1748
|
-
},
|
|
1749
1761
|
"contact": {
|
|
1750
1762
|
"type": "object",
|
|
1751
1763
|
"description": "Contact information for the service.",
|
|
@@ -1764,35 +1776,8 @@ exports.GENERATED_SCHEMAS = {
|
|
|
1764
1776
|
"additionalProperties": false
|
|
1765
1777
|
},
|
|
1766
1778
|
"license": {
|
|
1767
|
-
"type": "
|
|
1768
|
-
"description": "License
|
|
1769
|
-
"properties": {
|
|
1770
|
-
"name": {
|
|
1771
|
-
"type": "string",
|
|
1772
|
-
"description": "License name."
|
|
1773
|
-
},
|
|
1774
|
-
"url": {
|
|
1775
|
-
"$ref": "./common.schema.json#/$defs/Url"
|
|
1776
|
-
}
|
|
1777
|
-
},
|
|
1778
|
-
"additionalProperties": false
|
|
1779
|
-
},
|
|
1780
|
-
"servers": {
|
|
1781
|
-
"type": "array",
|
|
1782
|
-
"description": "Alternative servers where the service is available.",
|
|
1783
|
-
"items": {
|
|
1784
|
-
"type": "object",
|
|
1785
|
-
"properties": {
|
|
1786
|
-
"url": {
|
|
1787
|
-
"$ref": "./common.schema.json#/$defs/Url"
|
|
1788
|
-
},
|
|
1789
|
-
"description": {
|
|
1790
|
-
"type": "string",
|
|
1791
|
-
"description": "Description of the server."
|
|
1792
|
-
}
|
|
1793
|
-
},
|
|
1794
|
-
"additionalProperties": false
|
|
1795
|
-
}
|
|
1779
|
+
"type": "string",
|
|
1780
|
+
"description": "License name (e.g., MIT, Apache-2.0, GPL-3.0)."
|
|
1796
1781
|
},
|
|
1797
1782
|
"protocols": {
|
|
1798
1783
|
"type": "object",
|
|
@@ -1812,79 +1797,6 @@ exports.GENERATED_SCHEMAS = {
|
|
|
1812
1797
|
},
|
|
1813
1798
|
"schemas": {
|
|
1814
1799
|
"$ref": "./schemas.schema.json#"
|
|
1815
|
-
},
|
|
1816
|
-
"securitySchemes": {
|
|
1817
|
-
"type": "object",
|
|
1818
|
-
"description": "Authentication mechanisms available for this service.",
|
|
1819
|
-
"additionalProperties": {
|
|
1820
|
-
"$ref": "./common.schema.json#/$defs/SecurityScheme"
|
|
1821
|
-
}
|
|
1822
|
-
},
|
|
1823
|
-
"rateLimit": {
|
|
1824
|
-
"type": "object",
|
|
1825
|
-
"description": "Rate limiting configuration for the service.",
|
|
1826
|
-
"properties": {
|
|
1827
|
-
"requestsPerMinute": {
|
|
1828
|
-
"type": "integer",
|
|
1829
|
-
"minimum": 0,
|
|
1830
|
-
"description": "Maximum requests per minute."
|
|
1831
|
-
},
|
|
1832
|
-
"requestsPerHour": {
|
|
1833
|
-
"type": "integer",
|
|
1834
|
-
"minimum": 0,
|
|
1835
|
-
"description": "Maximum requests per hour."
|
|
1836
|
-
},
|
|
1837
|
-
"requestsPerDay": {
|
|
1838
|
-
"type": "integer",
|
|
1839
|
-
"minimum": 0,
|
|
1840
|
-
"description": "Maximum requests per day."
|
|
1841
|
-
},
|
|
1842
|
-
"burstLimit": {
|
|
1843
|
-
"type": "integer",
|
|
1844
|
-
"minimum": 0,
|
|
1845
|
-
"description": "Maximum burst requests allowed."
|
|
1846
|
-
},
|
|
1847
|
-
"perUser": {
|
|
1848
|
-
"type": "boolean",
|
|
1849
|
-
"description": "Whether rate limiting is applied per user.",
|
|
1850
|
-
"default": false
|
|
1851
|
-
},
|
|
1852
|
-
"perApiKey": {
|
|
1853
|
-
"type": "boolean",
|
|
1854
|
-
"description": "Whether rate limiting is applied per API key.",
|
|
1855
|
-
"default": false
|
|
1856
|
-
},
|
|
1857
|
-
"customKey": {
|
|
1858
|
-
"type": "string",
|
|
1859
|
-
"description": "Custom key for rate limiting (e.g., IP address, organization ID)."
|
|
1860
|
-
}
|
|
1861
|
-
},
|
|
1862
|
-
"additionalProperties": false
|
|
1863
|
-
},
|
|
1864
|
-
"compliance": {
|
|
1865
|
-
"type": "array",
|
|
1866
|
-
"description": "Compliance frameworks the service adheres to.",
|
|
1867
|
-
"items": {
|
|
1868
|
-
"type": "string",
|
|
1869
|
-
"enum": [
|
|
1870
|
-
"GDPR",
|
|
1871
|
-
"SOC2",
|
|
1872
|
-
"HIPAA",
|
|
1873
|
-
"PCI-DSS",
|
|
1874
|
-
"ISO27001",
|
|
1875
|
-
"CCPA"
|
|
1876
|
-
]
|
|
1877
|
-
}
|
|
1878
|
-
},
|
|
1879
|
-
"dataClassification": {
|
|
1880
|
-
"type": "string",
|
|
1881
|
-
"description": "Data classification level for the service.",
|
|
1882
|
-
"enum": [
|
|
1883
|
-
"public",
|
|
1884
|
-
"internal",
|
|
1885
|
-
"confidential",
|
|
1886
|
-
"restricted"
|
|
1887
|
-
]
|
|
1888
1800
|
}
|
|
1889
1801
|
},
|
|
1890
1802
|
"additionalProperties": false
|
|
@@ -1978,13 +1890,6 @@ exports.GENERATED_SCHEMAS = {
|
|
|
1978
1890
|
"description": {
|
|
1979
1891
|
"$ref": "./common.schema.json#/$defs/Description"
|
|
1980
1892
|
},
|
|
1981
|
-
"tags": {
|
|
1982
|
-
"type": "array",
|
|
1983
|
-
"description": "Tags for grouping channels.",
|
|
1984
|
-
"items": {
|
|
1985
|
-
"$ref": "./common.schema.json#/$defs/Tag"
|
|
1986
|
-
}
|
|
1987
|
-
},
|
|
1988
1893
|
"namespace": {
|
|
1989
1894
|
"type": "string",
|
|
1990
1895
|
"description": "Optional namespace for the channel (e.g. 'chat', 'notifications'). Used to group related channels and avoid name collisions."
|
|
@@ -92,27 +92,6 @@ function validateUrlPatterns(doc, options) {
|
|
|
92
92
|
const errors = [];
|
|
93
93
|
if (!options.checkUrlPatterns)
|
|
94
94
|
return errors;
|
|
95
|
-
// Validate baseUrl
|
|
96
|
-
if (doc.service.baseUrl) {
|
|
97
|
-
try {
|
|
98
|
-
new URL(doc.service.baseUrl);
|
|
99
|
-
if (!doc.service.baseUrl.startsWith("http") &&
|
|
100
|
-
!doc.service.baseUrl.startsWith("https")) {
|
|
101
|
-
errors.push({
|
|
102
|
-
message: "baseUrl should start with http:// or https://",
|
|
103
|
-
path: "/service/baseUrl",
|
|
104
|
-
code: "invalid_url",
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
catch {
|
|
109
|
-
errors.push({
|
|
110
|
-
message: "baseUrl is not a valid URL",
|
|
111
|
-
path: "/service/baseUrl",
|
|
112
|
-
code: "invalid_url",
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
95
|
// Validate REST route paths
|
|
117
96
|
const restRoutes = doc.service?.protocols?.rest?.routes || [];
|
|
118
97
|
for (const route of restRoutes) {
|
|
@@ -139,13 +139,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
139
139
|
expect: {
|
|
140
140
|
$ref: string;
|
|
141
141
|
};
|
|
142
|
-
tags: {
|
|
143
|
-
type: string;
|
|
144
|
-
description: string;
|
|
145
|
-
items: {
|
|
146
|
-
type: string;
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
142
|
};
|
|
150
143
|
additionalProperties: boolean;
|
|
151
144
|
};
|
|
@@ -450,6 +443,9 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
450
443
|
$ref: string;
|
|
451
444
|
};
|
|
452
445
|
};
|
|
446
|
+
rateLimit: {
|
|
447
|
+
$ref: string;
|
|
448
|
+
};
|
|
453
449
|
};
|
|
454
450
|
additionalProperties: boolean;
|
|
455
451
|
};
|
|
@@ -605,6 +601,9 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
605
601
|
$ref: string;
|
|
606
602
|
};
|
|
607
603
|
};
|
|
604
|
+
rateLimit: {
|
|
605
|
+
$ref: string;
|
|
606
|
+
};
|
|
608
607
|
};
|
|
609
608
|
additionalProperties: boolean;
|
|
610
609
|
};
|
|
@@ -848,6 +847,52 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
848
847
|
};
|
|
849
848
|
additionalProperties: boolean;
|
|
850
849
|
};
|
|
850
|
+
RateLimit: {
|
|
851
|
+
type: string;
|
|
852
|
+
description: string;
|
|
853
|
+
properties: {
|
|
854
|
+
inherit: {
|
|
855
|
+
type: string;
|
|
856
|
+
description: string;
|
|
857
|
+
default: boolean;
|
|
858
|
+
};
|
|
859
|
+
requestsPerMinute: {
|
|
860
|
+
type: string;
|
|
861
|
+
minimum: number;
|
|
862
|
+
description: string;
|
|
863
|
+
};
|
|
864
|
+
requestsPerHour: {
|
|
865
|
+
type: string;
|
|
866
|
+
minimum: number;
|
|
867
|
+
description: string;
|
|
868
|
+
};
|
|
869
|
+
requestsPerDay: {
|
|
870
|
+
type: string;
|
|
871
|
+
minimum: number;
|
|
872
|
+
description: string;
|
|
873
|
+
};
|
|
874
|
+
burstLimit: {
|
|
875
|
+
type: string;
|
|
876
|
+
minimum: number;
|
|
877
|
+
description: string;
|
|
878
|
+
};
|
|
879
|
+
perUser: {
|
|
880
|
+
type: string;
|
|
881
|
+
description: string;
|
|
882
|
+
default: boolean;
|
|
883
|
+
};
|
|
884
|
+
perApiKey: {
|
|
885
|
+
type: string;
|
|
886
|
+
description: string;
|
|
887
|
+
default: boolean;
|
|
888
|
+
};
|
|
889
|
+
customKey: {
|
|
890
|
+
type: string;
|
|
891
|
+
description: string;
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
additionalProperties: boolean;
|
|
895
|
+
};
|
|
851
896
|
Audit: {
|
|
852
897
|
type: string;
|
|
853
898
|
description: string;
|
|
@@ -919,11 +964,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
919
964
|
description: string;
|
|
920
965
|
pattern: string;
|
|
921
966
|
};
|
|
922
|
-
Tag: {
|
|
923
|
-
type: string;
|
|
924
|
-
description: string;
|
|
925
|
-
pattern: string;
|
|
926
|
-
};
|
|
927
967
|
SecurityScheme: {
|
|
928
968
|
type: string;
|
|
929
969
|
discriminator: {
|
|
@@ -1168,13 +1208,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1168
1208
|
description: {
|
|
1169
1209
|
$ref: string;
|
|
1170
1210
|
};
|
|
1171
|
-
tags: {
|
|
1172
|
-
type: string;
|
|
1173
|
-
description: string;
|
|
1174
|
-
items: {
|
|
1175
|
-
$ref: string;
|
|
1176
|
-
};
|
|
1177
|
-
};
|
|
1178
1211
|
deprecated: {
|
|
1179
1212
|
type: string;
|
|
1180
1213
|
description: string;
|
|
@@ -1217,7 +1250,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1217
1250
|
Email?: undefined;
|
|
1218
1251
|
Url?: undefined;
|
|
1219
1252
|
Version?: undefined;
|
|
1220
|
-
Tag?: undefined;
|
|
1221
1253
|
SecurityScheme?: undefined;
|
|
1222
1254
|
ApiKeyScheme?: undefined;
|
|
1223
1255
|
HttpScheme?: undefined;
|
|
@@ -1251,7 +1283,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1251
1283
|
type: string;
|
|
1252
1284
|
description: string;
|
|
1253
1285
|
additionalProperties: boolean;
|
|
1254
|
-
$ref?: undefined;
|
|
1255
1286
|
};
|
|
1256
1287
|
};
|
|
1257
1288
|
headers: {
|
|
@@ -1286,16 +1317,10 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1286
1317
|
name?: undefined;
|
|
1287
1318
|
description?: undefined;
|
|
1288
1319
|
version?: undefined;
|
|
1289
|
-
tags?: undefined;
|
|
1290
|
-
baseUrl?: undefined;
|
|
1291
1320
|
contact?: undefined;
|
|
1292
1321
|
license?: undefined;
|
|
1293
|
-
servers?: undefined;
|
|
1294
1322
|
protocols?: undefined;
|
|
1295
1323
|
schemas?: undefined;
|
|
1296
|
-
rateLimit?: undefined;
|
|
1297
|
-
compliance?: undefined;
|
|
1298
|
-
dataClassification?: undefined;
|
|
1299
1324
|
channels?: undefined;
|
|
1300
1325
|
};
|
|
1301
1326
|
additionalProperties: boolean;
|
|
@@ -1314,16 +1339,9 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1314
1339
|
name: {
|
|
1315
1340
|
$ref: string;
|
|
1316
1341
|
};
|
|
1317
|
-
|
|
1318
|
-
type: string;
|
|
1319
|
-
description: string;
|
|
1320
|
-
};
|
|
1321
|
-
tags: {
|
|
1342
|
+
description: {
|
|
1322
1343
|
type: string;
|
|
1323
1344
|
description: string;
|
|
1324
|
-
items: {
|
|
1325
|
-
$ref: string;
|
|
1326
|
-
};
|
|
1327
1345
|
};
|
|
1328
1346
|
deprecated: {
|
|
1329
1347
|
type: string;
|
|
@@ -1334,9 +1352,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1334
1352
|
type: string;
|
|
1335
1353
|
description: string;
|
|
1336
1354
|
};
|
|
1337
|
-
description: {
|
|
1338
|
-
$ref: string;
|
|
1339
|
-
};
|
|
1340
1355
|
path: {
|
|
1341
1356
|
type: string;
|
|
1342
1357
|
description: string;
|
|
@@ -1499,7 +1514,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1499
1514
|
Email?: undefined;
|
|
1500
1515
|
Url?: undefined;
|
|
1501
1516
|
Version?: undefined;
|
|
1502
|
-
Tag?: undefined;
|
|
1503
1517
|
SecurityScheme?: undefined;
|
|
1504
1518
|
ApiKeyScheme?: undefined;
|
|
1505
1519
|
HttpScheme?: undefined;
|
|
@@ -1535,7 +1549,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1535
1549
|
type: string;
|
|
1536
1550
|
description: string;
|
|
1537
1551
|
additionalProperties: boolean;
|
|
1538
|
-
$ref?: undefined;
|
|
1539
1552
|
};
|
|
1540
1553
|
};
|
|
1541
1554
|
url?: undefined;
|
|
@@ -1546,16 +1559,10 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1546
1559
|
name?: undefined;
|
|
1547
1560
|
description?: undefined;
|
|
1548
1561
|
version?: undefined;
|
|
1549
|
-
tags?: undefined;
|
|
1550
|
-
baseUrl?: undefined;
|
|
1551
1562
|
contact?: undefined;
|
|
1552
1563
|
license?: undefined;
|
|
1553
|
-
servers?: undefined;
|
|
1554
1564
|
protocols?: undefined;
|
|
1555
1565
|
schemas?: undefined;
|
|
1556
|
-
rateLimit?: undefined;
|
|
1557
|
-
compliance?: undefined;
|
|
1558
|
-
dataClassification?: undefined;
|
|
1559
1566
|
channels?: undefined;
|
|
1560
1567
|
};
|
|
1561
1568
|
additionalProperties: boolean;
|
|
@@ -1648,7 +1655,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1648
1655
|
Email?: undefined;
|
|
1649
1656
|
Url?: undefined;
|
|
1650
1657
|
Version?: undefined;
|
|
1651
|
-
Tag?: undefined;
|
|
1652
1658
|
SecurityScheme?: undefined;
|
|
1653
1659
|
ApiKeyScheme?: undefined;
|
|
1654
1660
|
HttpScheme?: undefined;
|
|
@@ -1687,17 +1693,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1687
1693
|
version: {
|
|
1688
1694
|
$ref: string;
|
|
1689
1695
|
};
|
|
1690
|
-
tags: {
|
|
1691
|
-
type: string;
|
|
1692
|
-
description: string;
|
|
1693
|
-
items: {
|
|
1694
|
-
$ref: string;
|
|
1695
|
-
};
|
|
1696
|
-
};
|
|
1697
|
-
baseUrl: {
|
|
1698
|
-
$ref: string;
|
|
1699
|
-
description: string;
|
|
1700
|
-
};
|
|
1701
1696
|
contact: {
|
|
1702
1697
|
type: string;
|
|
1703
1698
|
description: string;
|
|
@@ -1718,33 +1713,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1718
1713
|
license: {
|
|
1719
1714
|
type: string;
|
|
1720
1715
|
description: string;
|
|
1721
|
-
properties: {
|
|
1722
|
-
name: {
|
|
1723
|
-
type: string;
|
|
1724
|
-
description: string;
|
|
1725
|
-
};
|
|
1726
|
-
url: {
|
|
1727
|
-
$ref: string;
|
|
1728
|
-
};
|
|
1729
|
-
};
|
|
1730
|
-
additionalProperties: boolean;
|
|
1731
|
-
};
|
|
1732
|
-
servers: {
|
|
1733
|
-
type: string;
|
|
1734
|
-
description: string;
|
|
1735
|
-
items: {
|
|
1736
|
-
type: string;
|
|
1737
|
-
properties: {
|
|
1738
|
-
url: {
|
|
1739
|
-
$ref: string;
|
|
1740
|
-
};
|
|
1741
|
-
description: {
|
|
1742
|
-
type: string;
|
|
1743
|
-
description: string;
|
|
1744
|
-
};
|
|
1745
|
-
};
|
|
1746
|
-
additionalProperties: boolean;
|
|
1747
|
-
};
|
|
1748
1716
|
};
|
|
1749
1717
|
protocols: {
|
|
1750
1718
|
type: string;
|
|
@@ -1765,72 +1733,9 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1765
1733
|
schemas: {
|
|
1766
1734
|
$ref: string;
|
|
1767
1735
|
};
|
|
1768
|
-
securitySchemes: {
|
|
1769
|
-
type: string;
|
|
1770
|
-
description: string;
|
|
1771
|
-
additionalProperties: {
|
|
1772
|
-
$ref: string;
|
|
1773
|
-
type?: undefined;
|
|
1774
|
-
description?: undefined;
|
|
1775
|
-
additionalProperties?: undefined;
|
|
1776
|
-
};
|
|
1777
|
-
};
|
|
1778
|
-
rateLimit: {
|
|
1779
|
-
type: string;
|
|
1780
|
-
description: string;
|
|
1781
|
-
properties: {
|
|
1782
|
-
requestsPerMinute: {
|
|
1783
|
-
type: string;
|
|
1784
|
-
minimum: number;
|
|
1785
|
-
description: string;
|
|
1786
|
-
};
|
|
1787
|
-
requestsPerHour: {
|
|
1788
|
-
type: string;
|
|
1789
|
-
minimum: number;
|
|
1790
|
-
description: string;
|
|
1791
|
-
};
|
|
1792
|
-
requestsPerDay: {
|
|
1793
|
-
type: string;
|
|
1794
|
-
minimum: number;
|
|
1795
|
-
description: string;
|
|
1796
|
-
};
|
|
1797
|
-
burstLimit: {
|
|
1798
|
-
type: string;
|
|
1799
|
-
minimum: number;
|
|
1800
|
-
description: string;
|
|
1801
|
-
};
|
|
1802
|
-
perUser: {
|
|
1803
|
-
type: string;
|
|
1804
|
-
description: string;
|
|
1805
|
-
default: boolean;
|
|
1806
|
-
};
|
|
1807
|
-
perApiKey: {
|
|
1808
|
-
type: string;
|
|
1809
|
-
description: string;
|
|
1810
|
-
default: boolean;
|
|
1811
|
-
};
|
|
1812
|
-
customKey: {
|
|
1813
|
-
type: string;
|
|
1814
|
-
description: string;
|
|
1815
|
-
};
|
|
1816
|
-
};
|
|
1817
|
-
additionalProperties: boolean;
|
|
1818
|
-
};
|
|
1819
|
-
compliance: {
|
|
1820
|
-
type: string;
|
|
1821
|
-
description: string;
|
|
1822
|
-
items: {
|
|
1823
|
-
type: string;
|
|
1824
|
-
enum: string[];
|
|
1825
|
-
};
|
|
1826
|
-
};
|
|
1827
|
-
dataClassification: {
|
|
1828
|
-
type: string;
|
|
1829
|
-
description: string;
|
|
1830
|
-
enum: string[];
|
|
1831
|
-
};
|
|
1832
1736
|
url?: undefined;
|
|
1833
1737
|
schema?: undefined;
|
|
1738
|
+
securitySchemes?: undefined;
|
|
1834
1739
|
headers?: undefined;
|
|
1835
1740
|
queries?: undefined;
|
|
1836
1741
|
mutations?: undefined;
|
|
@@ -1920,13 +1825,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1920
1825
|
description: {
|
|
1921
1826
|
$ref: string;
|
|
1922
1827
|
};
|
|
1923
|
-
tags: {
|
|
1924
|
-
type: string;
|
|
1925
|
-
description: string;
|
|
1926
|
-
items: {
|
|
1927
|
-
$ref: string;
|
|
1928
|
-
};
|
|
1929
|
-
};
|
|
1930
1828
|
namespace: {
|
|
1931
1829
|
type: string;
|
|
1932
1830
|
description: string;
|
|
@@ -1999,7 +1897,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
1999
1897
|
Email?: undefined;
|
|
2000
1898
|
Url?: undefined;
|
|
2001
1899
|
Version?: undefined;
|
|
2002
|
-
Tag?: undefined;
|
|
2003
1900
|
SecurityScheme?: undefined;
|
|
2004
1901
|
ApiKeyScheme?: undefined;
|
|
2005
1902
|
HttpScheme?: undefined;
|
|
@@ -2043,7 +1940,6 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
2043
1940
|
type: string;
|
|
2044
1941
|
description: string;
|
|
2045
1942
|
additionalProperties: boolean;
|
|
2046
|
-
$ref?: undefined;
|
|
2047
1943
|
};
|
|
2048
1944
|
};
|
|
2049
1945
|
schema?: undefined;
|
|
@@ -2054,16 +1950,10 @@ export declare const GENERATED_SCHEMAS: {
|
|
|
2054
1950
|
name?: undefined;
|
|
2055
1951
|
description?: undefined;
|
|
2056
1952
|
version?: undefined;
|
|
2057
|
-
tags?: undefined;
|
|
2058
|
-
baseUrl?: undefined;
|
|
2059
1953
|
contact?: undefined;
|
|
2060
1954
|
license?: undefined;
|
|
2061
|
-
servers?: undefined;
|
|
2062
1955
|
protocols?: undefined;
|
|
2063
1956
|
schemas?: undefined;
|
|
2064
|
-
rateLimit?: undefined;
|
|
2065
|
-
compliance?: undefined;
|
|
2066
|
-
dataClassification?: undefined;
|
|
2067
1957
|
};
|
|
2068
1958
|
additionalProperties: boolean;
|
|
2069
1959
|
description?: undefined;
|
|
@@ -111,7 +111,7 @@ export const GENERATED_SCHEMAS = {
|
|
|
111
111
|
"properties": {
|
|
112
112
|
"weight": {
|
|
113
113
|
"type": "object",
|
|
114
|
-
"description": "Test weights by
|
|
114
|
+
"description": "Test weights by operation.",
|
|
115
115
|
"additionalProperties": {
|
|
116
116
|
"type": "integer",
|
|
117
117
|
"minimum": 1
|
|
@@ -154,13 +154,6 @@ export const GENERATED_SCHEMAS = {
|
|
|
154
154
|
},
|
|
155
155
|
"expect": {
|
|
156
156
|
"$ref": "#/$defs/TestExpect"
|
|
157
|
-
},
|
|
158
|
-
"tags": {
|
|
159
|
-
"type": "array",
|
|
160
|
-
"description": "Tags for grouping and filtering tests.",
|
|
161
|
-
"items": {
|
|
162
|
-
"type": "string"
|
|
163
|
-
}
|
|
164
157
|
}
|
|
165
158
|
},
|
|
166
159
|
"additionalProperties": false
|
|
@@ -501,6 +494,9 @@ export const GENERATED_SCHEMAS = {
|
|
|
501
494
|
"items": {
|
|
502
495
|
"$ref": "#/$defs/SecurityRequirement"
|
|
503
496
|
}
|
|
497
|
+
},
|
|
498
|
+
"rateLimit": {
|
|
499
|
+
"$ref": "#/$defs/RateLimit"
|
|
504
500
|
}
|
|
505
501
|
},
|
|
506
502
|
"additionalProperties": false
|
|
@@ -683,6 +679,9 @@ export const GENERATED_SCHEMAS = {
|
|
|
683
679
|
"items": {
|
|
684
680
|
"$ref": "#/$defs/SecurityRequirement"
|
|
685
681
|
}
|
|
682
|
+
},
|
|
683
|
+
"rateLimit": {
|
|
684
|
+
"$ref": "#/$defs/RateLimit"
|
|
686
685
|
}
|
|
687
686
|
},
|
|
688
687
|
"additionalProperties": false
|
|
@@ -949,6 +948,52 @@ export const GENERATED_SCHEMAS = {
|
|
|
949
948
|
},
|
|
950
949
|
"additionalProperties": false
|
|
951
950
|
},
|
|
951
|
+
"RateLimit": {
|
|
952
|
+
"type": "object",
|
|
953
|
+
"description": "Rate limiting configuration for the service.",
|
|
954
|
+
"properties": {
|
|
955
|
+
"inherit": {
|
|
956
|
+
"type": "boolean",
|
|
957
|
+
"description": "Whether to inherit from parent rate limit configuration. When true, only specified fields override parent values.",
|
|
958
|
+
"default": false
|
|
959
|
+
},
|
|
960
|
+
"requestsPerMinute": {
|
|
961
|
+
"type": "integer",
|
|
962
|
+
"minimum": 0,
|
|
963
|
+
"description": "Maximum requests per minute."
|
|
964
|
+
},
|
|
965
|
+
"requestsPerHour": {
|
|
966
|
+
"type": "integer",
|
|
967
|
+
"minimum": 0,
|
|
968
|
+
"description": "Maximum requests per hour."
|
|
969
|
+
},
|
|
970
|
+
"requestsPerDay": {
|
|
971
|
+
"type": "integer",
|
|
972
|
+
"minimum": 0,
|
|
973
|
+
"description": "Maximum requests per day."
|
|
974
|
+
},
|
|
975
|
+
"burstLimit": {
|
|
976
|
+
"type": "integer",
|
|
977
|
+
"minimum": 0,
|
|
978
|
+
"description": "Maximum burst requests allowed."
|
|
979
|
+
},
|
|
980
|
+
"perUser": {
|
|
981
|
+
"type": "boolean",
|
|
982
|
+
"description": "Whether rate limiting is applied per user.",
|
|
983
|
+
"default": false
|
|
984
|
+
},
|
|
985
|
+
"perApiKey": {
|
|
986
|
+
"type": "boolean",
|
|
987
|
+
"description": "Whether rate limiting is applied per API key.",
|
|
988
|
+
"default": false
|
|
989
|
+
},
|
|
990
|
+
"customKey": {
|
|
991
|
+
"type": "string",
|
|
992
|
+
"description": "Custom key for rate limiting (e.g., IP address, organization ID)."
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
"additionalProperties": false
|
|
996
|
+
},
|
|
952
997
|
"Audit": {
|
|
953
998
|
"type": "object",
|
|
954
999
|
"description": "Audit configuration for compliance.",
|
|
@@ -1024,11 +1069,6 @@ export const GENERATED_SCHEMAS = {
|
|
|
1024
1069
|
"description": "Semantic version string (SemVer).",
|
|
1025
1070
|
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
|
|
1026
1071
|
},
|
|
1027
|
-
"Tag": {
|
|
1028
|
-
"type": "string",
|
|
1029
|
-
"description": "Tag for grouping operations and resources.",
|
|
1030
|
-
"pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
|
|
1031
|
-
},
|
|
1032
1072
|
"SecurityScheme": {
|
|
1033
1073
|
"type": "object",
|
|
1034
1074
|
"discriminator": {
|
|
@@ -1297,13 +1337,6 @@ export const GENERATED_SCHEMAS = {
|
|
|
1297
1337
|
"description": {
|
|
1298
1338
|
"$ref": "./common.schema.json#/$defs/Description"
|
|
1299
1339
|
},
|
|
1300
|
-
"tags": {
|
|
1301
|
-
"type": "array",
|
|
1302
|
-
"description": "Tags for grouping operations.",
|
|
1303
|
-
"items": {
|
|
1304
|
-
"$ref": "./common.schema.json#/$defs/Tag"
|
|
1305
|
-
}
|
|
1306
|
-
},
|
|
1307
1340
|
"deprecated": {
|
|
1308
1341
|
"type": "boolean",
|
|
1309
1342
|
"description": "Marks the operation as deprecated.",
|
|
@@ -1407,17 +1440,10 @@ export const GENERATED_SCHEMAS = {
|
|
|
1407
1440
|
"name": {
|
|
1408
1441
|
"$ref": "./common.schema.json#/$defs/Identifier"
|
|
1409
1442
|
},
|
|
1410
|
-
"
|
|
1443
|
+
"description": {
|
|
1411
1444
|
"type": "string",
|
|
1412
1445
|
"description": "Short, human-readable summary of the route."
|
|
1413
1446
|
},
|
|
1414
|
-
"tags": {
|
|
1415
|
-
"type": "array",
|
|
1416
|
-
"description": "Tags for grouping operations.",
|
|
1417
|
-
"items": {
|
|
1418
|
-
"$ref": "./common.schema.json#/$defs/Tag"
|
|
1419
|
-
}
|
|
1420
|
-
},
|
|
1421
1447
|
"deprecated": {
|
|
1422
1448
|
"type": "boolean",
|
|
1423
1449
|
"description": "Marks the route as deprecated.",
|
|
@@ -1427,12 +1453,9 @@ export const GENERATED_SCHEMAS = {
|
|
|
1427
1453
|
"type": "string",
|
|
1428
1454
|
"description": "Human-readable reason for deprecation."
|
|
1429
1455
|
},
|
|
1430
|
-
"description": {
|
|
1431
|
-
"$ref": "./common.schema.json#/$defs/Description"
|
|
1432
|
-
},
|
|
1433
1456
|
"path": {
|
|
1434
1457
|
"type": "string",
|
|
1435
|
-
"description": "URL path template, e.g. /users
|
|
1458
|
+
"description": "URL path template, e.g. /users/:id."
|
|
1436
1459
|
},
|
|
1437
1460
|
"method": {
|
|
1438
1461
|
"type": "string",
|
|
@@ -1732,17 +1755,6 @@ export const GENERATED_SCHEMAS = {
|
|
|
1732
1755
|
"version": {
|
|
1733
1756
|
"$ref": "./common.schema.json#/$defs/Version"
|
|
1734
1757
|
},
|
|
1735
|
-
"tags": {
|
|
1736
|
-
"type": "array",
|
|
1737
|
-
"description": "Tags for grouping and categorizing the service.",
|
|
1738
|
-
"items": {
|
|
1739
|
-
"$ref": "./common.schema.json#/$defs/Tag"
|
|
1740
|
-
}
|
|
1741
|
-
},
|
|
1742
|
-
"baseUrl": {
|
|
1743
|
-
"$ref": "./common.schema.json#/$defs/Url",
|
|
1744
|
-
"description": "Base URL for the service. Used as the default prefix for all protocol endpoints."
|
|
1745
|
-
},
|
|
1746
1758
|
"contact": {
|
|
1747
1759
|
"type": "object",
|
|
1748
1760
|
"description": "Contact information for the service.",
|
|
@@ -1761,35 +1773,8 @@ export const GENERATED_SCHEMAS = {
|
|
|
1761
1773
|
"additionalProperties": false
|
|
1762
1774
|
},
|
|
1763
1775
|
"license": {
|
|
1764
|
-
"type": "
|
|
1765
|
-
"description": "License
|
|
1766
|
-
"properties": {
|
|
1767
|
-
"name": {
|
|
1768
|
-
"type": "string",
|
|
1769
|
-
"description": "License name."
|
|
1770
|
-
},
|
|
1771
|
-
"url": {
|
|
1772
|
-
"$ref": "./common.schema.json#/$defs/Url"
|
|
1773
|
-
}
|
|
1774
|
-
},
|
|
1775
|
-
"additionalProperties": false
|
|
1776
|
-
},
|
|
1777
|
-
"servers": {
|
|
1778
|
-
"type": "array",
|
|
1779
|
-
"description": "Alternative servers where the service is available.",
|
|
1780
|
-
"items": {
|
|
1781
|
-
"type": "object",
|
|
1782
|
-
"properties": {
|
|
1783
|
-
"url": {
|
|
1784
|
-
"$ref": "./common.schema.json#/$defs/Url"
|
|
1785
|
-
},
|
|
1786
|
-
"description": {
|
|
1787
|
-
"type": "string",
|
|
1788
|
-
"description": "Description of the server."
|
|
1789
|
-
}
|
|
1790
|
-
},
|
|
1791
|
-
"additionalProperties": false
|
|
1792
|
-
}
|
|
1776
|
+
"type": "string",
|
|
1777
|
+
"description": "License name (e.g., MIT, Apache-2.0, GPL-3.0)."
|
|
1793
1778
|
},
|
|
1794
1779
|
"protocols": {
|
|
1795
1780
|
"type": "object",
|
|
@@ -1809,79 +1794,6 @@ export const GENERATED_SCHEMAS = {
|
|
|
1809
1794
|
},
|
|
1810
1795
|
"schemas": {
|
|
1811
1796
|
"$ref": "./schemas.schema.json#"
|
|
1812
|
-
},
|
|
1813
|
-
"securitySchemes": {
|
|
1814
|
-
"type": "object",
|
|
1815
|
-
"description": "Authentication mechanisms available for this service.",
|
|
1816
|
-
"additionalProperties": {
|
|
1817
|
-
"$ref": "./common.schema.json#/$defs/SecurityScheme"
|
|
1818
|
-
}
|
|
1819
|
-
},
|
|
1820
|
-
"rateLimit": {
|
|
1821
|
-
"type": "object",
|
|
1822
|
-
"description": "Rate limiting configuration for the service.",
|
|
1823
|
-
"properties": {
|
|
1824
|
-
"requestsPerMinute": {
|
|
1825
|
-
"type": "integer",
|
|
1826
|
-
"minimum": 0,
|
|
1827
|
-
"description": "Maximum requests per minute."
|
|
1828
|
-
},
|
|
1829
|
-
"requestsPerHour": {
|
|
1830
|
-
"type": "integer",
|
|
1831
|
-
"minimum": 0,
|
|
1832
|
-
"description": "Maximum requests per hour."
|
|
1833
|
-
},
|
|
1834
|
-
"requestsPerDay": {
|
|
1835
|
-
"type": "integer",
|
|
1836
|
-
"minimum": 0,
|
|
1837
|
-
"description": "Maximum requests per day."
|
|
1838
|
-
},
|
|
1839
|
-
"burstLimit": {
|
|
1840
|
-
"type": "integer",
|
|
1841
|
-
"minimum": 0,
|
|
1842
|
-
"description": "Maximum burst requests allowed."
|
|
1843
|
-
},
|
|
1844
|
-
"perUser": {
|
|
1845
|
-
"type": "boolean",
|
|
1846
|
-
"description": "Whether rate limiting is applied per user.",
|
|
1847
|
-
"default": false
|
|
1848
|
-
},
|
|
1849
|
-
"perApiKey": {
|
|
1850
|
-
"type": "boolean",
|
|
1851
|
-
"description": "Whether rate limiting is applied per API key.",
|
|
1852
|
-
"default": false
|
|
1853
|
-
},
|
|
1854
|
-
"customKey": {
|
|
1855
|
-
"type": "string",
|
|
1856
|
-
"description": "Custom key for rate limiting (e.g., IP address, organization ID)."
|
|
1857
|
-
}
|
|
1858
|
-
},
|
|
1859
|
-
"additionalProperties": false
|
|
1860
|
-
},
|
|
1861
|
-
"compliance": {
|
|
1862
|
-
"type": "array",
|
|
1863
|
-
"description": "Compliance frameworks the service adheres to.",
|
|
1864
|
-
"items": {
|
|
1865
|
-
"type": "string",
|
|
1866
|
-
"enum": [
|
|
1867
|
-
"GDPR",
|
|
1868
|
-
"SOC2",
|
|
1869
|
-
"HIPAA",
|
|
1870
|
-
"PCI-DSS",
|
|
1871
|
-
"ISO27001",
|
|
1872
|
-
"CCPA"
|
|
1873
|
-
]
|
|
1874
|
-
}
|
|
1875
|
-
},
|
|
1876
|
-
"dataClassification": {
|
|
1877
|
-
"type": "string",
|
|
1878
|
-
"description": "Data classification level for the service.",
|
|
1879
|
-
"enum": [
|
|
1880
|
-
"public",
|
|
1881
|
-
"internal",
|
|
1882
|
-
"confidential",
|
|
1883
|
-
"restricted"
|
|
1884
|
-
]
|
|
1885
1797
|
}
|
|
1886
1798
|
},
|
|
1887
1799
|
"additionalProperties": false
|
|
@@ -1975,13 +1887,6 @@ export const GENERATED_SCHEMAS = {
|
|
|
1975
1887
|
"description": {
|
|
1976
1888
|
"$ref": "./common.schema.json#/$defs/Description"
|
|
1977
1889
|
},
|
|
1978
|
-
"tags": {
|
|
1979
|
-
"type": "array",
|
|
1980
|
-
"description": "Tags for grouping channels.",
|
|
1981
|
-
"items": {
|
|
1982
|
-
"$ref": "./common.schema.json#/$defs/Tag"
|
|
1983
|
-
}
|
|
1984
|
-
},
|
|
1985
1890
|
"namespace": {
|
|
1986
1891
|
"type": "string",
|
|
1987
1892
|
"description": "Optional namespace for the channel (e.g. 'chat', 'notifications'). Used to group related channels and avoid name collisions."
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,9 +6,6 @@ export interface UniSpecDeprecatedItem {
|
|
|
6
6
|
deprecated?: boolean;
|
|
7
7
|
deprecationReason?: string;
|
|
8
8
|
}
|
|
9
|
-
export interface UniSpecTaggedItem {
|
|
10
|
-
tags?: string[];
|
|
11
|
-
}
|
|
12
9
|
export interface UniSpecProtocolBase {
|
|
13
10
|
url?: string;
|
|
14
11
|
securitySchemes?: Record<string, UniSpecSecurityScheme>;
|
|
@@ -63,7 +60,7 @@ export interface UniSpecGraphQLArgument extends UniSpecNamedItem, UniSpecDepreca
|
|
|
63
60
|
type: string;
|
|
64
61
|
defaultValue?: unknown;
|
|
65
62
|
}
|
|
66
|
-
export interface UniSpecGraphQLOperation extends UniSpecNamedItem, UniSpecDeprecatedItem
|
|
63
|
+
export interface UniSpecGraphQLOperation extends UniSpecNamedItem, UniSpecDeprecatedItem {
|
|
67
64
|
args?: UniSpecGraphQLArgument[];
|
|
68
65
|
returnType?: string;
|
|
69
66
|
headers?: UniSpecGraphQLHeader[];
|
|
@@ -89,7 +86,7 @@ export interface UniSpecWebSocketReconnectStrategy {
|
|
|
89
86
|
delay?: number;
|
|
90
87
|
backoffMultiplier?: number;
|
|
91
88
|
}
|
|
92
|
-
export interface UniSpecWebSocketChannel extends UniSpecNamedItem, UniSpecDeprecatedItem
|
|
89
|
+
export interface UniSpecWebSocketChannel extends UniSpecNamedItem, UniSpecDeprecatedItem {
|
|
93
90
|
namespace?: string;
|
|
94
91
|
direction?: "publish" | "subscribe" | "both";
|
|
95
92
|
connectionParams?: Record<string, string>;
|
|
@@ -123,8 +120,8 @@ export interface UniSpecRestResponse {
|
|
|
123
120
|
headers?: UniSpecRestResponseHeader[];
|
|
124
121
|
content?: UniSpecRestContent;
|
|
125
122
|
}
|
|
126
|
-
export interface UniSpecRestRoute extends UniSpecNamedItem, UniSpecDeprecatedItem
|
|
127
|
-
|
|
123
|
+
export interface UniSpecRestRoute extends UniSpecNamedItem, UniSpecDeprecatedItem {
|
|
124
|
+
description?: string;
|
|
128
125
|
path: string;
|
|
129
126
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
130
127
|
pathParams?: UniSpecRestParameter[];
|
|
@@ -173,10 +170,10 @@ export interface UniSpecContact {
|
|
|
173
170
|
url?: string;
|
|
174
171
|
}
|
|
175
172
|
export interface UniSpecLicense {
|
|
176
|
-
name
|
|
177
|
-
url?: string;
|
|
173
|
+
name: string;
|
|
178
174
|
}
|
|
179
175
|
export interface UniSpecRateLimit {
|
|
176
|
+
inherit?: boolean;
|
|
180
177
|
requestsPerMinute?: number;
|
|
181
178
|
requestsPerHour?: number;
|
|
182
179
|
requestsPerDay?: number;
|
|
@@ -196,16 +193,14 @@ export interface UniSpecDocument {
|
|
|
196
193
|
unispecVersion: string;
|
|
197
194
|
service: UniSpecService;
|
|
198
195
|
}
|
|
199
|
-
export interface UniSpecService extends UniSpecNamedItem
|
|
196
|
+
export interface UniSpecService extends UniSpecNamedItem {
|
|
200
197
|
version?: string;
|
|
201
|
-
baseUrl?: string;
|
|
202
198
|
contact?: UniSpecContact;
|
|
203
|
-
license?:
|
|
199
|
+
license?: string;
|
|
204
200
|
servers?: UniSpecServer[];
|
|
205
201
|
protocols?: UniSpecServiceProtocols;
|
|
206
202
|
schemas?: UniSpecSchemas;
|
|
207
203
|
securitySchemes?: Record<string, UniSpecSecurityScheme>;
|
|
208
|
-
rateLimit?: UniSpecRateLimit;
|
|
209
204
|
compliance?: UniSpecCompliance[];
|
|
210
205
|
dataClassification?: UniSpecDataClassification;
|
|
211
206
|
}
|
|
@@ -286,7 +281,6 @@ export interface UniSpecTestCase extends UniSpecNamedItem {
|
|
|
286
281
|
target: UniSpecTestTarget;
|
|
287
282
|
request: UniSpecTestRequest;
|
|
288
283
|
expect: UniSpecTestExpect;
|
|
289
|
-
tags?: string[];
|
|
290
284
|
}
|
|
291
285
|
export interface UniSpecTestsDocument {
|
|
292
286
|
uniSpecTestsVersion: string;
|
|
@@ -325,6 +319,7 @@ export interface UniSpecConfigServiceEntry {
|
|
|
325
319
|
discovery?: UniSpecConfigDiscovery;
|
|
326
320
|
headers?: UniSpecConfigHeader[];
|
|
327
321
|
security?: UniSpecConfigSecurityRequirement[];
|
|
322
|
+
rateLimit?: UniSpecRateLimit;
|
|
328
323
|
}
|
|
329
324
|
export type UniSpecConfigSpecReference = string | UniSpecConfigHttpSpecReference | UniSpecConfigFileSpecReference | UniSpecConfigRegistrySpecReference;
|
|
330
325
|
export interface UniSpecConfigHttpSpecReference {
|
|
@@ -364,6 +359,7 @@ export interface UniSpecConfigServiceOverride {
|
|
|
364
359
|
discovery?: UniSpecConfigDiscovery;
|
|
365
360
|
headers?: UniSpecConfigHeader[];
|
|
366
361
|
security?: UniSpecConfigSecurityRequirement[];
|
|
362
|
+
rateLimit?: UniSpecRateLimit;
|
|
367
363
|
}
|
|
368
364
|
export interface UniSpecConfigHeader {
|
|
369
365
|
name: string;
|
|
@@ -89,27 +89,6 @@ function validateUrlPatterns(doc, options) {
|
|
|
89
89
|
const errors = [];
|
|
90
90
|
if (!options.checkUrlPatterns)
|
|
91
91
|
return errors;
|
|
92
|
-
// Validate baseUrl
|
|
93
|
-
if (doc.service.baseUrl) {
|
|
94
|
-
try {
|
|
95
|
-
new URL(doc.service.baseUrl);
|
|
96
|
-
if (!doc.service.baseUrl.startsWith("http") &&
|
|
97
|
-
!doc.service.baseUrl.startsWith("https")) {
|
|
98
|
-
errors.push({
|
|
99
|
-
message: "baseUrl should start with http:// or https://",
|
|
100
|
-
path: "/service/baseUrl",
|
|
101
|
-
code: "invalid_url",
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
catch {
|
|
106
|
-
errors.push({
|
|
107
|
-
message: "baseUrl is not a valid URL",
|
|
108
|
-
path: "/service/baseUrl",
|
|
109
|
-
code: "invalid_url",
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
92
|
// Validate REST route paths
|
|
114
93
|
const restRoutes = doc.service?.protocols?.rest?.routes || [];
|
|
115
94
|
for (const route of restRoutes) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unispechq/unispec-core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Central UniSpec Core Engine providing parsing, validation, normalization, diffing, and conversion of UniSpec specs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"release:major": "node scripts/release.js major"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@unispechq/unispec-schema": "^0.4.
|
|
52
|
+
"@unispechq/unispec-schema": "^0.4.8",
|
|
53
53
|
"ajv": "^8.12.0"
|
|
54
54
|
},
|
|
55
55
|
"optionalDependencies": {
|