@unispechq/unispec-core 0.3.2 → 0.3.3
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/src/cache/cache-factory.js +1 -1
- package/dist/cjs/src/cache/cache-manager.js +2 -2
- package/dist/cjs/src/cache/hash-utils.js +1 -1
- package/dist/cjs/src/cache/hashing.js +1 -1
- package/dist/cjs/src/cache/index.js +5 -5
- package/dist/cjs/src/cache/lru-cache.js +1 -1
- package/dist/cjs/src/diff/core.js +2 -2
- package/dist/cjs/src/diff/enhanced-diff.js +5 -5
- package/dist/cjs/src/diff/index.js +8 -8
- package/dist/cjs/src/errors/config-error.js +1 -1
- package/dist/cjs/src/errors/error-factory.js +7 -7
- package/dist/cjs/src/errors/index.js +8 -8
- package/dist/cjs/src/errors/loader-error.js +1 -1
- package/dist/cjs/src/errors/reference-error.js +1 -1
- package/dist/cjs/src/errors/schema-error.js +1 -1
- package/dist/cjs/src/errors/security-error.js +1 -1
- package/dist/cjs/src/errors/semantic-error.js +1 -1
- package/dist/cjs/src/index.js +13 -13
- package/dist/cjs/src/loader/index.js +4 -4
- package/dist/cjs/src/loader/security-validator.js +1 -1
- package/dist/cjs/src/loader/unispec-loader.js +3 -3
- package/dist/cjs/src/loader/yaml-loader.js +1 -1
- package/dist/cjs/src/normalizer/core.js +4 -4
- package/dist/cjs/src/normalizer/index.js +1 -1
- package/dist/cjs/src/optimizer/core.js +2 -2
- package/dist/cjs/src/optimizer/index.js +3 -3
- package/dist/cjs/src/optimizer/optimization-functions.js +2 -2
- package/dist/cjs/src/schemas/dedupe.js +1 -1
- package/dist/cjs/src/schemas/index.js +3 -3
- package/dist/cjs/src/schemas/resolver.js +1 -1
- package/dist/cjs/src/validator/ajv-validator.js +1 -1
- package/dist/cjs/src/validator/config-validator-main.js +4 -4
- package/dist/cjs/src/validator/config-validator.js +1 -1
- package/dist/cjs/src/validator/index.js +7 -7
- package/dist/cjs/src/validator/reference-validator.js +1 -1
- package/dist/cjs/src/validator/tests-validator.js +2 -2
- package/dist/cjs/src/validator/unispec-validator.js +5 -5
- package/dist/cjs/src/validator/validator-factory.js +1 -1
- package/dist/cjs/tests/cache/cache.test.js +4 -4
- package/dist/cjs/tests/cache/utils.js +1 -1
- package/dist/cjs/tests/diff/diff-annotators.test.js +2 -2
- package/dist/cjs/tests/diff/diff-comprehensive.test.js +2 -2
- package/dist/cjs/tests/diff/diff-extended.test.js +2 -2
- package/dist/cjs/tests/diff/diff.test.js +2 -2
- package/dist/cjs/tests/diff/utils.js +1 -1
- package/dist/cjs/tests/errors/errors-integration.test.js +3 -3
- package/dist/cjs/tests/errors/errors.test.js +2 -2
- package/dist/cjs/tests/errors/utils.js +1 -1
- package/dist/cjs/tests/loader/integration.test.js +2 -2
- package/dist/cjs/tests/loader/loader.test.js +2 -2
- package/dist/cjs/tests/normalizer/normalizer-comprehensive.test.js +2 -2
- package/dist/cjs/tests/normalizer/normalizer-invalid.test.js +2 -2
- package/dist/cjs/tests/normalizer/normalizer-valid.test.js +2 -2
- package/dist/cjs/tests/normalizer/utils.js +1 -1
- package/dist/cjs/tests/optimizer/compress-references.test.js +2 -2
- package/dist/cjs/tests/optimizer/deduplication.test.js +2 -2
- package/dist/cjs/tests/optimizer/integration.test.js +3 -3
- package/dist/cjs/tests/optimizer/optimization-report.test.js +2 -2
- package/dist/cjs/tests/optimizer/optimize-document.test.js +2 -2
- package/dist/cjs/tests/optimizer/orphaned-schemas.test.js +2 -2
- package/dist/cjs/tests/optimizer/sort-schemas.test.js +2 -2
- package/dist/cjs/tests/optimizer/utils.js +1 -1
- package/dist/cjs/tests/schemas/schemas-edge-cases.test.js +3 -3
- package/dist/cjs/tests/schemas/schemas.test.js +3 -3
- package/dist/cjs/tests/schemas/utils.js +1 -1
- package/dist/cjs/tests/validator/config-validator.test.js +2 -2
- package/dist/cjs/tests/validator/unispec-validator.test.js +2 -2
- package/dist/cjs/tests/validator/utils.js +1 -1
- package/package.json +1 -1
- package/dist/cache/cache-factory.d.ts +0 -31
- package/dist/cache/cache-factory.js +0 -65
- package/dist/cache/cache-manager.d.ts +0 -62
- package/dist/cache/cache-manager.js +0 -122
- package/dist/cache/constants.d.ts +0 -21
- package/dist/cache/constants.js +0 -22
- package/dist/cache/hash-utils.d.ts +0 -21
- package/dist/cache/hash-utils.js +0 -35
- package/dist/cache/hashing.d.ts +0 -19
- package/dist/cache/hashing.js +0 -197
- package/dist/cache/index.d.ts +0 -6
- package/dist/cache/index.js +0 -10
- package/dist/cache/lru-cache.d.ts +0 -56
- package/dist/cache/lru-cache.js +0 -161
- package/dist/cache/types.d.ts +0 -24
- package/dist/cache/types.js +0 -4
- package/dist/cjs/cache/cache-factory.js +0 -72
- package/dist/cjs/cache/cache-manager.js +0 -126
- package/dist/cjs/cache/constants.js +0 -25
- package/dist/cjs/cache/hash-utils.js +0 -41
- package/dist/cjs/cache/hashing.js +0 -236
- package/dist/cjs/cache/index.js +0 -26
- package/dist/cjs/cache/lru-cache.js +0 -165
- package/dist/cjs/cache/types.js +0 -5
- package/dist/cjs/diff/annotators.js +0 -159
- package/dist/cjs/diff/change-reports.js +0 -369
- package/dist/cjs/diff/core.js +0 -158
- package/dist/cjs/diff/enhanced-diff.js +0 -79
- package/dist/cjs/diff/impact-strategies-refactored.js +0 -230
- package/dist/cjs/diff/impact-strategies.js +0 -219
- package/dist/cjs/diff/index.js +0 -27
- package/dist/cjs/diff/metrics-calculator.js +0 -69
- package/dist/cjs/diff/risk-calculator.js +0 -58
- package/dist/cjs/diff/suggestion-generator.js +0 -78
- package/dist/cjs/diff/types.js +0 -11
- package/dist/cjs/errors/base-error.js +0 -33
- package/dist/cjs/errors/config-error.js +0 -11
- package/dist/cjs/errors/error-factory.js +0 -48
- package/dist/cjs/errors/index.js +0 -19
- package/dist/cjs/errors/loader-error.js +0 -11
- package/dist/cjs/errors/reference-error.js +0 -11
- package/dist/cjs/errors/schema-error.js +0 -11
- package/dist/cjs/errors/security-error.js +0 -11
- package/dist/cjs/errors/semantic-error.js +0 -11
- package/dist/cjs/generated-schemas.js +0 -2100
- package/dist/cjs/index.js +0 -59
- package/dist/cjs/loader/index.js +0 -13
- package/dist/cjs/loader/security-validator.js +0 -53
- package/dist/cjs/loader/types.js +0 -11
- package/dist/cjs/loader/unispec-loader.js +0 -84
- package/dist/cjs/loader/yaml-loader.js +0 -76
- package/dist/cjs/normalizer/core.js +0 -32
- package/dist/cjs/normalizer/graphql-normalizer.js +0 -67
- package/dist/cjs/normalizer/index.js +0 -7
- package/dist/cjs/normalizer/rest-normalizer.js +0 -51
- package/dist/cjs/normalizer/types.js +0 -2
- package/dist/cjs/normalizer/utils.js +0 -33
- package/dist/cjs/normalizer/websocket-normalizer.js +0 -81
- package/dist/cjs/optimizer/core.js +0 -115
- package/dist/cjs/optimizer/index.js +0 -17
- package/dist/cjs/optimizer/optimization-functions.js +0 -185
- package/dist/cjs/optimizer/types.js +0 -2
- package/dist/cjs/optimizer/utils.js +0 -32
- package/dist/cjs/schemas/dedupe.js +0 -100
- package/dist/cjs/schemas/index.js +0 -14
- package/dist/cjs/schemas/resolver.js +0 -41
- package/dist/cjs/schemas/utils.js +0 -53
- package/dist/cjs/types/index.js +0 -2
- package/dist/cjs/validator/ajv-validator.js +0 -82
- package/dist/cjs/validator/config-validator-main.js +0 -34
- package/dist/cjs/validator/config-validator.js +0 -17
- package/dist/cjs/validator/index.js +0 -23
- package/dist/cjs/validator/object-traversal.js +0 -112
- package/dist/cjs/validator/reference-validator.js +0 -233
- package/dist/cjs/validator/schema-references.js +0 -116
- package/dist/cjs/validator/semantic-validator.js +0 -328
- package/dist/cjs/validator/tests-validator.js +0 -16
- package/dist/cjs/validator/types.js +0 -2
- package/dist/cjs/validator/unispec-validator.js +0 -84
- package/dist/cjs/validator/validator-factory.js +0 -77
- package/dist/cjs/versions.js +0 -147
- package/dist/diff/annotators.d.ts +0 -4
- package/dist/diff/annotators.js +0 -154
- package/dist/diff/change-reports.d.ts +0 -37
- package/dist/diff/change-reports.js +0 -366
- package/dist/diff/core.d.ts +0 -26
- package/dist/diff/core.js +0 -155
- package/dist/diff/enhanced-diff.d.ts +0 -51
- package/dist/diff/enhanced-diff.js +0 -76
- package/dist/diff/impact-strategies-refactored.d.ts +0 -69
- package/dist/diff/impact-strategies-refactored.js +0 -223
- package/dist/diff/impact-strategies.d.ts +0 -41
- package/dist/diff/impact-strategies.js +0 -212
- package/dist/diff/index.d.ts +0 -8
- package/dist/diff/index.js +0 -11
- package/dist/diff/metrics-calculator.d.ts +0 -23
- package/dist/diff/metrics-calculator.js +0 -65
- package/dist/diff/risk-calculator.d.ts +0 -23
- package/dist/diff/risk-calculator.js +0 -55
- package/dist/diff/suggestion-generator.d.ts +0 -18
- package/dist/diff/suggestion-generator.js +0 -74
- package/dist/diff/types.d.ts +0 -24
- package/dist/diff/types.js +0 -8
- package/dist/errors/base-error.d.ts +0 -20
- package/dist/errors/base-error.js +0 -29
- package/dist/errors/config-error.d.ts +0 -4
- package/dist/errors/config-error.js +0 -7
- package/dist/errors/error-factory.d.ts +0 -22
- package/dist/errors/error-factory.js +0 -45
- package/dist/errors/index.d.ts +0 -8
- package/dist/errors/index.js +0 -8
- package/dist/errors/loader-error.d.ts +0 -4
- package/dist/errors/loader-error.js +0 -7
- package/dist/errors/reference-error.d.ts +0 -4
- package/dist/errors/reference-error.js +0 -7
- package/dist/errors/schema-error.d.ts +0 -4
- package/dist/errors/schema-error.js +0 -7
- package/dist/errors/security-error.d.ts +0 -4
- package/dist/errors/security-error.js +0 -7
- package/dist/errors/semantic-error.d.ts +0 -4
- package/dist/errors/semantic-error.js +0 -7
- package/dist/generated-schemas.d.ts +0 -2073
- package/dist/generated-schemas.js +0 -2097
- package/dist/index.cjs +0 -59
- package/dist/index.d.ts +0 -13
- package/dist/index.js +0 -43
- package/dist/loader/index.d.ts +0 -5
- package/dist/loader/index.js +0 -5
- package/dist/loader/security-validator.d.ts +0 -5
- package/dist/loader/security-validator.js +0 -50
- package/dist/loader/types.d.ts +0 -30
- package/dist/loader/types.js +0 -8
- package/dist/loader/unispec-loader.d.ts +0 -10
- package/dist/loader/unispec-loader.js +0 -81
- package/dist/loader/yaml-loader.d.ts +0 -10
- package/dist/loader/yaml-loader.js +0 -39
- package/dist/normalizer/core.d.ts +0 -24
- package/dist/normalizer/core.js +0 -29
- package/dist/normalizer/graphql-normalizer.d.ts +0 -8
- package/dist/normalizer/graphql-normalizer.js +0 -64
- package/dist/normalizer/index.d.ts +0 -2
- package/dist/normalizer/index.js +0 -3
- package/dist/normalizer/rest-normalizer.d.ts +0 -8
- package/dist/normalizer/rest-normalizer.js +0 -48
- package/dist/normalizer/types.d.ts +0 -7
- package/dist/normalizer/types.js +0 -1
- package/dist/normalizer/utils.d.ts +0 -14
- package/dist/normalizer/utils.js +0 -29
- package/dist/normalizer/websocket-normalizer.d.ts +0 -8
- package/dist/normalizer/websocket-normalizer.js +0 -78
- package/dist/optimizer/core.d.ts +0 -17
- package/dist/optimizer/core.js +0 -111
- package/dist/optimizer/index.d.ts +0 -4
- package/dist/optimizer/index.js +0 -7
- package/dist/optimizer/optimization-functions.d.ts +0 -32
- package/dist/optimizer/optimization-functions.js +0 -179
- package/dist/optimizer/types.d.ts +0 -28
- package/dist/optimizer/types.js +0 -1
- package/dist/optimizer/utils.d.ts +0 -7
- package/dist/optimizer/utils.js +0 -29
- package/dist/schemas/dedupe.d.ts +0 -9
- package/dist/schemas/dedupe.js +0 -97
- package/dist/schemas/index.d.ts +0 -3
- package/dist/schemas/index.js +0 -6
- package/dist/schemas/resolver.d.ts +0 -19
- package/dist/schemas/resolver.js +0 -37
- package/dist/schemas/utils.d.ts +0 -20
- package/dist/schemas/utils.js +0 -49
- package/dist/types/index.d.ts +0 -433
- package/dist/types/index.js +0 -1
- package/dist/validator/ajv-validator.d.ts +0 -15
- package/dist/validator/ajv-validator.js +0 -75
- package/dist/validator/config-validator-main.d.ts +0 -10
- package/dist/validator/config-validator-main.js +0 -31
- package/dist/validator/config-validator.d.ts +0 -5
- package/dist/validator/config-validator.js +0 -14
- package/dist/validator/index.d.ts +0 -10
- package/dist/validator/index.js +0 -11
- package/dist/validator/object-traversal.d.ts +0 -52
- package/dist/validator/object-traversal.js +0 -104
- package/dist/validator/reference-validator.d.ts +0 -31
- package/dist/validator/reference-validator.js +0 -230
- package/dist/validator/schema-references.d.ts +0 -23
- package/dist/validator/schema-references.js +0 -111
- package/dist/validator/semantic-validator.d.ts +0 -26
- package/dist/validator/semantic-validator.js +0 -325
- package/dist/validator/tests-validator.d.ts +0 -9
- package/dist/validator/tests-validator.js +0 -13
- package/dist/validator/types.d.ts +0 -29
- package/dist/validator/types.js +0 -1
- package/dist/validator/unispec-validator.d.ts +0 -15
- package/dist/validator/unispec-validator.js +0 -81
- package/dist/validator/validator-factory.d.ts +0 -10
- package/dist/validator/validator-factory.js +0 -73
- package/dist/versions.d.ts +0 -10
- package/dist/versions.js +0 -143
|
@@ -1,2100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Auto-generated schemas for validator
|
|
3
|
-
// This file is generated during build time
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.SCHEMA_IDS = exports.GENERATED_SCHEMAS = void 0;
|
|
6
|
-
exports.GENERATED_SCHEMAS = {
|
|
7
|
-
unispec: {
|
|
8
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
9
|
-
"$id": "https://unispec.dev/schema/unispec.schema.json",
|
|
10
|
-
"title": "UniSpec document",
|
|
11
|
-
"description": "Top-level UniSpec document describing a multi-protocol API service.",
|
|
12
|
-
"type": "object",
|
|
13
|
-
"required": [
|
|
14
|
-
"unispecVersion",
|
|
15
|
-
"service"
|
|
16
|
-
],
|
|
17
|
-
"properties": {
|
|
18
|
-
"unispecVersion": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"description": "UniSpec format version (SemVer)."
|
|
21
|
-
},
|
|
22
|
-
"service": {
|
|
23
|
-
"$ref": "./types/service.schema.json#"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"additionalProperties": false
|
|
27
|
-
},
|
|
28
|
-
unispecTests: {
|
|
29
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
30
|
-
"$id": "https://unispec.dev/schema/unispec-tests.schema.json",
|
|
31
|
-
"title": "UniSpec Tests document",
|
|
32
|
-
"description": "Executable test cases targeting UniSpec-described services.",
|
|
33
|
-
"type": "object",
|
|
34
|
-
"required": [
|
|
35
|
-
"uniSpecTestsVersion",
|
|
36
|
-
"target",
|
|
37
|
-
"tests"
|
|
38
|
-
],
|
|
39
|
-
"properties": {
|
|
40
|
-
"uniSpecTestsVersion": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"description": "UniSpec Tests format version (SemVer)."
|
|
43
|
-
},
|
|
44
|
-
"target": {
|
|
45
|
-
"type": "object",
|
|
46
|
-
"description": "Service and environment that this test document targets.",
|
|
47
|
-
"required": [
|
|
48
|
-
"serviceName"
|
|
49
|
-
],
|
|
50
|
-
"properties": {
|
|
51
|
-
"serviceName": {
|
|
52
|
-
"type": "string",
|
|
53
|
-
"description": "Identifier of the service, matching service.name from UniSpec."
|
|
54
|
-
},
|
|
55
|
-
"serviceVersion": {
|
|
56
|
-
"type": "string",
|
|
57
|
-
"description": "Optional service contract version, matching service.version when provided."
|
|
58
|
-
},
|
|
59
|
-
"environment": {
|
|
60
|
-
"type": "string",
|
|
61
|
-
"description": "Optional environment name, matching service.environments[].name when provided."
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"additionalProperties": false
|
|
65
|
-
},
|
|
66
|
-
"tests": {
|
|
67
|
-
"type": "array",
|
|
68
|
-
"description": "List of test cases.",
|
|
69
|
-
"items": {
|
|
70
|
-
"$ref": "#/$defs/TestCase"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"loadTesting": {
|
|
74
|
-
"type": "object",
|
|
75
|
-
"description": "Load testing configuration for this test suite.",
|
|
76
|
-
"properties": {
|
|
77
|
-
"concurrentUsers": {
|
|
78
|
-
"type": "integer",
|
|
79
|
-
"minimum": 1,
|
|
80
|
-
"description": "Number of concurrent users to simulate."
|
|
81
|
-
},
|
|
82
|
-
"duration": {
|
|
83
|
-
"type": "string",
|
|
84
|
-
"description": "Test duration (e.g., '10m', '1h')."
|
|
85
|
-
},
|
|
86
|
-
"rampUp": {
|
|
87
|
-
"type": "string",
|
|
88
|
-
"description": "Ramp-up time for reaching concurrent users."
|
|
89
|
-
},
|
|
90
|
-
"thresholds": {
|
|
91
|
-
"type": "object",
|
|
92
|
-
"description": "Performance thresholds.",
|
|
93
|
-
"properties": {
|
|
94
|
-
"responseTime": {
|
|
95
|
-
"type": "string",
|
|
96
|
-
"description": "Maximum response time (e.g., '200ms', '1s')."
|
|
97
|
-
},
|
|
98
|
-
"errorRate": {
|
|
99
|
-
"type": "number",
|
|
100
|
-
"minimum": 0,
|
|
101
|
-
"maximum": 1,
|
|
102
|
-
"description": "Maximum error rate (0.0 to 1.0)."
|
|
103
|
-
},
|
|
104
|
-
"throughput": {
|
|
105
|
-
"type": "string",
|
|
106
|
-
"description": "Minimum throughput (e.g., '100req/s')."
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
"additionalProperties": false
|
|
110
|
-
},
|
|
111
|
-
"scenario": {
|
|
112
|
-
"type": "object",
|
|
113
|
-
"description": "Load test scenario configuration.",
|
|
114
|
-
"properties": {
|
|
115
|
-
"weight": {
|
|
116
|
-
"type": "object",
|
|
117
|
-
"description": "Test weights by tag or operation.",
|
|
118
|
-
"additionalProperties": {
|
|
119
|
-
"type": "integer",
|
|
120
|
-
"minimum": 1
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
"thinkTime": {
|
|
124
|
-
"type": "string",
|
|
125
|
-
"description": "User think time between requests."
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
"additionalProperties": false
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
"additionalProperties": false
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
"$defs": {
|
|
135
|
-
"TestCase": {
|
|
136
|
-
"type": "object",
|
|
137
|
-
"required": [
|
|
138
|
-
"name",
|
|
139
|
-
"target",
|
|
140
|
-
"request",
|
|
141
|
-
"expect"
|
|
142
|
-
],
|
|
143
|
-
"properties": {
|
|
144
|
-
"name": {
|
|
145
|
-
"type": "string",
|
|
146
|
-
"description": "Test identifier, unique within this document."
|
|
147
|
-
},
|
|
148
|
-
"description": {
|
|
149
|
-
"type": "string",
|
|
150
|
-
"description": "Human-readable description of the test case."
|
|
151
|
-
},
|
|
152
|
-
"target": {
|
|
153
|
-
"$ref": "#/$defs/TestTarget"
|
|
154
|
-
},
|
|
155
|
-
"request": {
|
|
156
|
-
"$ref": "#/$defs/TestRequest"
|
|
157
|
-
},
|
|
158
|
-
"expect": {
|
|
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
|
-
}
|
|
168
|
-
},
|
|
169
|
-
"additionalProperties": false
|
|
170
|
-
},
|
|
171
|
-
"TestTarget": {
|
|
172
|
-
"type": "object",
|
|
173
|
-
"required": [
|
|
174
|
-
"protocol",
|
|
175
|
-
"operationId"
|
|
176
|
-
],
|
|
177
|
-
"properties": {
|
|
178
|
-
"protocol": {
|
|
179
|
-
"type": "string",
|
|
180
|
-
"description": "Protocol of the operation under test.",
|
|
181
|
-
"enum": [
|
|
182
|
-
"rest",
|
|
183
|
-
"graphql",
|
|
184
|
-
"websocket"
|
|
185
|
-
]
|
|
186
|
-
},
|
|
187
|
-
"operationId": {
|
|
188
|
-
"type": "string",
|
|
189
|
-
"description": "Operation identifier within the service (for example, REST route name)."
|
|
190
|
-
},
|
|
191
|
-
"environment": {
|
|
192
|
-
"type": "string",
|
|
193
|
-
"description": "Optional environment name overriding the document-level target.environment."
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
"additionalProperties": false
|
|
197
|
-
},
|
|
198
|
-
"TestRequest": {
|
|
199
|
-
"type": "object",
|
|
200
|
-
"description": "Protocol-specific request definition.",
|
|
201
|
-
"properties": {
|
|
202
|
-
"rest": {
|
|
203
|
-
"$ref": "#/$defs/RestRequest"
|
|
204
|
-
},
|
|
205
|
-
"graphql": {
|
|
206
|
-
"$ref": "#/$defs/GraphQLRequest"
|
|
207
|
-
},
|
|
208
|
-
"websocket": {
|
|
209
|
-
"$ref": "#/$defs/WebSocketRequest"
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
"additionalProperties": false
|
|
213
|
-
},
|
|
214
|
-
"TestExpect": {
|
|
215
|
-
"type": "object",
|
|
216
|
-
"description": "Protocol-specific expectations.",
|
|
217
|
-
"properties": {
|
|
218
|
-
"rest": {
|
|
219
|
-
"$ref": "#/$defs/RestExpect"
|
|
220
|
-
},
|
|
221
|
-
"graphql": {
|
|
222
|
-
"$ref": "#/$defs/GraphQLExpect"
|
|
223
|
-
},
|
|
224
|
-
"websocket": {
|
|
225
|
-
"$ref": "#/$defs/WebSocketExpect"
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
"additionalProperties": false
|
|
229
|
-
},
|
|
230
|
-
"RestRequest": {
|
|
231
|
-
"type": "object",
|
|
232
|
-
"properties": {
|
|
233
|
-
"params": {
|
|
234
|
-
"type": "object",
|
|
235
|
-
"properties": {
|
|
236
|
-
"path": {
|
|
237
|
-
"type": "object",
|
|
238
|
-
"additionalProperties": true
|
|
239
|
-
},
|
|
240
|
-
"query": {
|
|
241
|
-
"type": "object",
|
|
242
|
-
"additionalProperties": true
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
"additionalProperties": false
|
|
246
|
-
},
|
|
247
|
-
"headers": {
|
|
248
|
-
"type": "object",
|
|
249
|
-
"additionalProperties": true
|
|
250
|
-
},
|
|
251
|
-
"body": {
|
|
252
|
-
"description": "Request body (arbitrary JSON value)."
|
|
253
|
-
},
|
|
254
|
-
"authProfile": {
|
|
255
|
-
"type": "string",
|
|
256
|
-
"description": "Identifier of an authentication profile configured in tooling."
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
"additionalProperties": false
|
|
260
|
-
},
|
|
261
|
-
"RestExpect": {
|
|
262
|
-
"type": "object",
|
|
263
|
-
"required": [
|
|
264
|
-
"status"
|
|
265
|
-
],
|
|
266
|
-
"properties": {
|
|
267
|
-
"status": {
|
|
268
|
-
"description": "Expected HTTP status code or list of acceptable codes.",
|
|
269
|
-
"oneOf": [
|
|
270
|
-
{
|
|
271
|
-
"type": "integer"
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
"type": "array",
|
|
275
|
-
"items": {
|
|
276
|
-
"type": "integer"
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
]
|
|
280
|
-
},
|
|
281
|
-
"headers": {
|
|
282
|
-
"type": "object",
|
|
283
|
-
"description": "Expected headers (usually partial match).",
|
|
284
|
-
"additionalProperties": true
|
|
285
|
-
},
|
|
286
|
-
"body": {
|
|
287
|
-
"$ref": "#/$defs/BodyExpectation"
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
"additionalProperties": false
|
|
291
|
-
},
|
|
292
|
-
"BodyExpectation": {
|
|
293
|
-
"type": "object",
|
|
294
|
-
"properties": {
|
|
295
|
-
"mode": {
|
|
296
|
-
"type": "string",
|
|
297
|
-
"enum": [
|
|
298
|
-
"exact",
|
|
299
|
-
"contains",
|
|
300
|
-
"schemaOnly",
|
|
301
|
-
"snapshot"
|
|
302
|
-
],
|
|
303
|
-
"description": "Assertion mode for the response body."
|
|
304
|
-
},
|
|
305
|
-
"json": {
|
|
306
|
-
"description": "JSON value used for exact or contains mode."
|
|
307
|
-
},
|
|
308
|
-
"schemaRef": {
|
|
309
|
-
"type": "string",
|
|
310
|
-
"description": "Reference to a schema from service.schemas for schemaOnly mode. Recommended format: <SchemaName> (where SchemaName is a key in service.schemas). Tools may also accept a JSON Pointer in the form #/service/schemas/<SchemaName>."
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
"additionalProperties": false
|
|
314
|
-
},
|
|
315
|
-
"GraphQLRequest": {
|
|
316
|
-
"type": "object",
|
|
317
|
-
"properties": {
|
|
318
|
-
"operationName": {
|
|
319
|
-
"type": "string"
|
|
320
|
-
},
|
|
321
|
-
"query": {
|
|
322
|
-
"type": "string"
|
|
323
|
-
},
|
|
324
|
-
"variables": {
|
|
325
|
-
"type": "object",
|
|
326
|
-
"additionalProperties": true
|
|
327
|
-
},
|
|
328
|
-
"headers": {
|
|
329
|
-
"type": "object",
|
|
330
|
-
"additionalProperties": true
|
|
331
|
-
},
|
|
332
|
-
"authProfile": {
|
|
333
|
-
"type": "string",
|
|
334
|
-
"description": "Identifier of an authentication profile configured in tooling."
|
|
335
|
-
}
|
|
336
|
-
},
|
|
337
|
-
"required": [
|
|
338
|
-
"query"
|
|
339
|
-
],
|
|
340
|
-
"additionalProperties": false
|
|
341
|
-
},
|
|
342
|
-
"GraphQLExpect": {
|
|
343
|
-
"type": "object",
|
|
344
|
-
"properties": {
|
|
345
|
-
"data": {
|
|
346
|
-
"description": "Expectations on the data field (exact or partial match)."
|
|
347
|
-
},
|
|
348
|
-
"errors": {
|
|
349
|
-
"description": "Expectations on the errors field."
|
|
350
|
-
},
|
|
351
|
-
"bodyMode": {
|
|
352
|
-
"type": "string",
|
|
353
|
-
"description": "Optional control over how strictly data and errors are matched."
|
|
354
|
-
}
|
|
355
|
-
},
|
|
356
|
-
"additionalProperties": false
|
|
357
|
-
},
|
|
358
|
-
"WebSocketRequest": {
|
|
359
|
-
"type": "object",
|
|
360
|
-
"properties": {
|
|
361
|
-
"channel": {
|
|
362
|
-
"type": "string",
|
|
363
|
-
"description": "Channel identifier, matching protocols.websocket.channels[].name."
|
|
364
|
-
},
|
|
365
|
-
"direction": {
|
|
366
|
-
"type": "string",
|
|
367
|
-
"enum": [
|
|
368
|
-
"publish",
|
|
369
|
-
"subscribe",
|
|
370
|
-
"both"
|
|
371
|
-
]
|
|
372
|
-
},
|
|
373
|
-
"messages": {
|
|
374
|
-
"type": "array",
|
|
375
|
-
"description": "Message actions (send/expect) forming a small interaction script.",
|
|
376
|
-
"items": {
|
|
377
|
-
"$ref": "#/$defs/WebSocketMessageAction"
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
"authProfile": {
|
|
381
|
-
"type": "string",
|
|
382
|
-
"description": "Identifier of an authentication profile configured in tooling."
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
"required": [
|
|
386
|
-
"channel"
|
|
387
|
-
],
|
|
388
|
-
"additionalProperties": false
|
|
389
|
-
},
|
|
390
|
-
"WebSocketMessageAction": {
|
|
391
|
-
"type": "object",
|
|
392
|
-
"required": [
|
|
393
|
-
"type",
|
|
394
|
-
"messageName"
|
|
395
|
-
],
|
|
396
|
-
"properties": {
|
|
397
|
-
"type": {
|
|
398
|
-
"type": "string",
|
|
399
|
-
"enum": [
|
|
400
|
-
"send",
|
|
401
|
-
"expect"
|
|
402
|
-
],
|
|
403
|
-
"description": "Whether this action sends or expects a message."
|
|
404
|
-
},
|
|
405
|
-
"messageName": {
|
|
406
|
-
"type": "string",
|
|
407
|
-
"description": "Name of the message, matching protocols.websocket.channels[].messages[].name."
|
|
408
|
-
},
|
|
409
|
-
"payload": {
|
|
410
|
-
"description": "Payload to send or expected payload structure."
|
|
411
|
-
}
|
|
412
|
-
},
|
|
413
|
-
"additionalProperties": false
|
|
414
|
-
},
|
|
415
|
-
"WebSocketExpect": {
|
|
416
|
-
"type": "object",
|
|
417
|
-
"properties": {
|
|
418
|
-
"messages": {
|
|
419
|
-
"type": "array",
|
|
420
|
-
"description": "Expected messages to be observed on the channel.",
|
|
421
|
-
"items": {
|
|
422
|
-
"$ref": "#/$defs/WebSocketMessageAction"
|
|
423
|
-
}
|
|
424
|
-
},
|
|
425
|
-
"timeoutMs": {
|
|
426
|
-
"type": "integer",
|
|
427
|
-
"description": "Timeout for the WebSocket interaction in milliseconds."
|
|
428
|
-
}
|
|
429
|
-
},
|
|
430
|
-
"additionalProperties": false
|
|
431
|
-
}
|
|
432
|
-
},
|
|
433
|
-
"additionalProperties": false
|
|
434
|
-
},
|
|
435
|
-
unispecConfig: {
|
|
436
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
437
|
-
"$id": "https://unispec.dev/schema/unispec-config.schema.json",
|
|
438
|
-
"title": "UniSpec Config",
|
|
439
|
-
"description": "Configuration file that describes how to locate UniSpec documents for one or more services.",
|
|
440
|
-
"type": "object",
|
|
441
|
-
"required": [
|
|
442
|
-
"version",
|
|
443
|
-
"services"
|
|
444
|
-
],
|
|
445
|
-
"properties": {
|
|
446
|
-
"version": {
|
|
447
|
-
"type": "integer",
|
|
448
|
-
"description": "Config format version.",
|
|
449
|
-
"minimum": 1
|
|
450
|
-
},
|
|
451
|
-
"services": {
|
|
452
|
-
"type": "array",
|
|
453
|
-
"description": "List of services available in this config.",
|
|
454
|
-
"items": {
|
|
455
|
-
"$ref": "#/$defs/ServiceEntry"
|
|
456
|
-
},
|
|
457
|
-
"minItems": 1
|
|
458
|
-
},
|
|
459
|
-
"discovery": {
|
|
460
|
-
"$ref": "#/$defs/Discovery"
|
|
461
|
-
},
|
|
462
|
-
"environments": {
|
|
463
|
-
"type": "array",
|
|
464
|
-
"description": "Named environments (for example, local, staging, prod) with optional overrides.",
|
|
465
|
-
"items": {
|
|
466
|
-
"$ref": "#/$defs/Environment"
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
},
|
|
470
|
-
"$defs": {
|
|
471
|
-
"ServiceEntry": {
|
|
472
|
-
"type": "object",
|
|
473
|
-
"required": [
|
|
474
|
-
"name",
|
|
475
|
-
"spec"
|
|
476
|
-
],
|
|
477
|
-
"properties": {
|
|
478
|
-
"name": {
|
|
479
|
-
"$ref": "./types/common.schema.json#/$defs/Identifier"
|
|
480
|
-
},
|
|
481
|
-
"baseUrl": {
|
|
482
|
-
"type": "string",
|
|
483
|
-
"description": "Service base URL. Can differ per service and can be overridden by environments."
|
|
484
|
-
},
|
|
485
|
-
"spec": {
|
|
486
|
-
"$ref": "#/$defs/SpecReference"
|
|
487
|
-
},
|
|
488
|
-
"health": {
|
|
489
|
-
"$ref": "#/$defs/Health"
|
|
490
|
-
},
|
|
491
|
-
"discovery": {
|
|
492
|
-
"$ref": "#/$defs/Discovery"
|
|
493
|
-
},
|
|
494
|
-
"headers": {
|
|
495
|
-
"type": "array",
|
|
496
|
-
"description": "HTTP headers commonly used for accessing this service's UniSpec document.",
|
|
497
|
-
"items": {
|
|
498
|
-
"$ref": "#/$defs/Header"
|
|
499
|
-
}
|
|
500
|
-
},
|
|
501
|
-
"security": {
|
|
502
|
-
"type": "array",
|
|
503
|
-
"description": "Security requirements for accessing this service's UniSpec document. Each item represents an alternative set of named security schemes.",
|
|
504
|
-
"items": {
|
|
505
|
-
"$ref": "#/$defs/SecurityRequirement"
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
},
|
|
509
|
-
"additionalProperties": false
|
|
510
|
-
},
|
|
511
|
-
"SpecReference": {
|
|
512
|
-
"description": "Reference to a UniSpec document.",
|
|
513
|
-
"oneOf": [
|
|
514
|
-
{
|
|
515
|
-
"type": "string",
|
|
516
|
-
"description": "Backward-compatible spec reference. Tooling interprets it as a location string (for example, URL or file path)."
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
"$ref": "#/$defs/HttpSpecReference"
|
|
520
|
-
},
|
|
521
|
-
{
|
|
522
|
-
"$ref": "#/$defs/FileSpecReference"
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
"$ref": "#/$defs/RegistrySpecReference"
|
|
526
|
-
}
|
|
527
|
-
]
|
|
528
|
-
},
|
|
529
|
-
"HttpSpecReference": {
|
|
530
|
-
"type": "object",
|
|
531
|
-
"required": [
|
|
532
|
-
"type"
|
|
533
|
-
],
|
|
534
|
-
"properties": {
|
|
535
|
-
"type": {
|
|
536
|
-
"const": "http"
|
|
537
|
-
},
|
|
538
|
-
"url": {
|
|
539
|
-
"type": "string",
|
|
540
|
-
"description": "Absolute or relative URL to the UniSpec document (for example, https://... or /unispec.json)."
|
|
541
|
-
},
|
|
542
|
-
"path": {
|
|
543
|
-
"type": "string",
|
|
544
|
-
"description": "Backward-compatible alias for url (for example, /unispec.yaml)."
|
|
545
|
-
}
|
|
546
|
-
},
|
|
547
|
-
"oneOf": [
|
|
548
|
-
{
|
|
549
|
-
"required": [
|
|
550
|
-
"url"
|
|
551
|
-
]
|
|
552
|
-
},
|
|
553
|
-
{
|
|
554
|
-
"required": [
|
|
555
|
-
"path"
|
|
556
|
-
]
|
|
557
|
-
}
|
|
558
|
-
],
|
|
559
|
-
"additionalProperties": false
|
|
560
|
-
},
|
|
561
|
-
"FileSpecReference": {
|
|
562
|
-
"type": "object",
|
|
563
|
-
"required": [
|
|
564
|
-
"type",
|
|
565
|
-
"path"
|
|
566
|
-
],
|
|
567
|
-
"properties": {
|
|
568
|
-
"type": {
|
|
569
|
-
"const": "file"
|
|
570
|
-
},
|
|
571
|
-
"path": {
|
|
572
|
-
"type": "string",
|
|
573
|
-
"description": "Path to the UniSpec document on disk (for example, ./path/to/unispec.json)."
|
|
574
|
-
}
|
|
575
|
-
},
|
|
576
|
-
"additionalProperties": false
|
|
577
|
-
},
|
|
578
|
-
"RegistrySpecReference": {
|
|
579
|
-
"type": "object",
|
|
580
|
-
"required": [
|
|
581
|
-
"type",
|
|
582
|
-
"ref"
|
|
583
|
-
],
|
|
584
|
-
"properties": {
|
|
585
|
-
"type": {
|
|
586
|
-
"const": "registry"
|
|
587
|
-
},
|
|
588
|
-
"ref": {
|
|
589
|
-
"type": "string",
|
|
590
|
-
"description": "Registry reference for resolving the UniSpec document."
|
|
591
|
-
}
|
|
592
|
-
},
|
|
593
|
-
"additionalProperties": false
|
|
594
|
-
},
|
|
595
|
-
"Health": {
|
|
596
|
-
"type": "object",
|
|
597
|
-
"required": [
|
|
598
|
-
"path"
|
|
599
|
-
],
|
|
600
|
-
"properties": {
|
|
601
|
-
"path": {
|
|
602
|
-
"type": "string",
|
|
603
|
-
"description": "HTTP path for a health check endpoint (for example, /ping)."
|
|
604
|
-
}
|
|
605
|
-
},
|
|
606
|
-
"additionalProperties": false
|
|
607
|
-
},
|
|
608
|
-
"Discovery": {
|
|
609
|
-
"type": "object",
|
|
610
|
-
"properties": {
|
|
611
|
-
"dnsTemplate": {
|
|
612
|
-
"type": "string",
|
|
613
|
-
"description": "DNS-based discovery template. Template variables: {service}, {env}. If environment is not set, {env} is replaced with an empty string."
|
|
614
|
-
}
|
|
615
|
-
},
|
|
616
|
-
"additionalProperties": false
|
|
617
|
-
},
|
|
618
|
-
"Environment": {
|
|
619
|
-
"type": "object",
|
|
620
|
-
"required": [
|
|
621
|
-
"name"
|
|
622
|
-
],
|
|
623
|
-
"properties": {
|
|
624
|
-
"name": {
|
|
625
|
-
"type": "string",
|
|
626
|
-
"description": "Environment name (for example, local, staging, prod)."
|
|
627
|
-
},
|
|
628
|
-
"overrides": {
|
|
629
|
-
"$ref": "#/$defs/EnvironmentOverrides"
|
|
630
|
-
},
|
|
631
|
-
"observability": {
|
|
632
|
-
"$ref": "#/$defs/Observability"
|
|
633
|
-
},
|
|
634
|
-
"deployment": {
|
|
635
|
-
"$ref": "#/$defs/Deployment"
|
|
636
|
-
},
|
|
637
|
-
"dataResidency": {
|
|
638
|
-
"type": "string",
|
|
639
|
-
"description": "Geographic region where data is stored for compliance."
|
|
640
|
-
},
|
|
641
|
-
"audit": {
|
|
642
|
-
"$ref": "#/$defs/Audit"
|
|
643
|
-
}
|
|
644
|
-
},
|
|
645
|
-
"additionalProperties": false
|
|
646
|
-
},
|
|
647
|
-
"EnvironmentOverrides": {
|
|
648
|
-
"type": "object",
|
|
649
|
-
"properties": {
|
|
650
|
-
"services": {
|
|
651
|
-
"type": "object",
|
|
652
|
-
"description": "Per-service overrides. Keys are service names.",
|
|
653
|
-
"additionalProperties": {
|
|
654
|
-
"$ref": "#/$defs/ServiceOverride"
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
},
|
|
658
|
-
"additionalProperties": false
|
|
659
|
-
},
|
|
660
|
-
"ServiceOverride": {
|
|
661
|
-
"type": "object",
|
|
662
|
-
"properties": {
|
|
663
|
-
"baseUrl": {
|
|
664
|
-
"type": "string",
|
|
665
|
-
"description": "Override for service baseUrl in this environment."
|
|
666
|
-
},
|
|
667
|
-
"spec": {
|
|
668
|
-
"$ref": "#/$defs/SpecReference"
|
|
669
|
-
},
|
|
670
|
-
"health": {
|
|
671
|
-
"$ref": "#/$defs/Health"
|
|
672
|
-
},
|
|
673
|
-
"discovery": {
|
|
674
|
-
"$ref": "#/$defs/Discovery"
|
|
675
|
-
},
|
|
676
|
-
"headers": {
|
|
677
|
-
"type": "array",
|
|
678
|
-
"description": "HTTP headers overrides for accessing this service's UniSpec document in this environment.",
|
|
679
|
-
"items": {
|
|
680
|
-
"$ref": "#/$defs/Header"
|
|
681
|
-
}
|
|
682
|
-
},
|
|
683
|
-
"security": {
|
|
684
|
-
"type": "array",
|
|
685
|
-
"description": "Security requirements overrides for accessing this service's UniSpec document in this environment.",
|
|
686
|
-
"items": {
|
|
687
|
-
"$ref": "#/$defs/SecurityRequirement"
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
},
|
|
691
|
-
"additionalProperties": false
|
|
692
|
-
},
|
|
693
|
-
"Header": {
|
|
694
|
-
"type": "object",
|
|
695
|
-
"required": [
|
|
696
|
-
"name"
|
|
697
|
-
],
|
|
698
|
-
"properties": {
|
|
699
|
-
"name": {
|
|
700
|
-
"type": "string",
|
|
701
|
-
"description": "Header name (case-insensitive)."
|
|
702
|
-
},
|
|
703
|
-
"description": {
|
|
704
|
-
"type": "string",
|
|
705
|
-
"description": "Human-readable description of the header."
|
|
706
|
-
},
|
|
707
|
-
"required": {
|
|
708
|
-
"type": "boolean",
|
|
709
|
-
"description": "Whether this header is required.",
|
|
710
|
-
"default": false
|
|
711
|
-
},
|
|
712
|
-
"defaultValue": {
|
|
713
|
-
"type": "string",
|
|
714
|
-
"description": "Default value for the header."
|
|
715
|
-
}
|
|
716
|
-
},
|
|
717
|
-
"additionalProperties": false
|
|
718
|
-
},
|
|
719
|
-
"SecurityRequirement": {
|
|
720
|
-
"type": "array",
|
|
721
|
-
"description": "Alternative set of named security schemes applied to a service or operation.",
|
|
722
|
-
"items": {
|
|
723
|
-
"$ref": "./types/common.schema.json#/$defs/Identifier"
|
|
724
|
-
}
|
|
725
|
-
},
|
|
726
|
-
"Observability": {
|
|
727
|
-
"type": "object",
|
|
728
|
-
"description": "Observability configuration for the environment.",
|
|
729
|
-
"properties": {
|
|
730
|
-
"logging": {
|
|
731
|
-
"type": "object",
|
|
732
|
-
"properties": {
|
|
733
|
-
"level": {
|
|
734
|
-
"type": "string",
|
|
735
|
-
"enum": [
|
|
736
|
-
"debug",
|
|
737
|
-
"info",
|
|
738
|
-
"warn",
|
|
739
|
-
"error"
|
|
740
|
-
],
|
|
741
|
-
"description": "Logging level."
|
|
742
|
-
},
|
|
743
|
-
"format": {
|
|
744
|
-
"type": "string",
|
|
745
|
-
"enum": [
|
|
746
|
-
"json",
|
|
747
|
-
"text"
|
|
748
|
-
],
|
|
749
|
-
"description": "Log format."
|
|
750
|
-
},
|
|
751
|
-
"fields": {
|
|
752
|
-
"type": "array",
|
|
753
|
-
"items": {
|
|
754
|
-
"type": "string"
|
|
755
|
-
},
|
|
756
|
-
"description": "Additional fields to include in logs."
|
|
757
|
-
}
|
|
758
|
-
},
|
|
759
|
-
"additionalProperties": false
|
|
760
|
-
},
|
|
761
|
-
"metrics": {
|
|
762
|
-
"type": "object",
|
|
763
|
-
"properties": {
|
|
764
|
-
"enabled": {
|
|
765
|
-
"type": "boolean",
|
|
766
|
-
"description": "Whether metrics collection is enabled."
|
|
767
|
-
},
|
|
768
|
-
"endpoints": {
|
|
769
|
-
"type": "array",
|
|
770
|
-
"items": {
|
|
771
|
-
"type": "string"
|
|
772
|
-
},
|
|
773
|
-
"description": "Metrics endpoints."
|
|
774
|
-
},
|
|
775
|
-
"customMetrics": {
|
|
776
|
-
"type": "array",
|
|
777
|
-
"items": {
|
|
778
|
-
"$ref": "#/$defs/CustomMetric"
|
|
779
|
-
},
|
|
780
|
-
"description": "Custom metrics definitions."
|
|
781
|
-
}
|
|
782
|
-
},
|
|
783
|
-
"additionalProperties": false
|
|
784
|
-
},
|
|
785
|
-
"tracing": {
|
|
786
|
-
"type": "object",
|
|
787
|
-
"properties": {
|
|
788
|
-
"enabled": {
|
|
789
|
-
"type": "boolean",
|
|
790
|
-
"description": "Whether distributed tracing is enabled."
|
|
791
|
-
},
|
|
792
|
-
"samplingRate": {
|
|
793
|
-
"type": "number",
|
|
794
|
-
"minimum": 0,
|
|
795
|
-
"maximum": 1,
|
|
796
|
-
"description": "Sampling rate for traces (0.0 to 1.0)."
|
|
797
|
-
},
|
|
798
|
-
"exporter": {
|
|
799
|
-
"type": "string",
|
|
800
|
-
"description": "Tracing exporter (e.g., jaeger, zipkin)."
|
|
801
|
-
}
|
|
802
|
-
},
|
|
803
|
-
"additionalProperties": false
|
|
804
|
-
}
|
|
805
|
-
},
|
|
806
|
-
"additionalProperties": false
|
|
807
|
-
},
|
|
808
|
-
"CustomMetric": {
|
|
809
|
-
"type": "object",
|
|
810
|
-
"properties": {
|
|
811
|
-
"name": {
|
|
812
|
-
"type": "string",
|
|
813
|
-
"description": "Metric name."
|
|
814
|
-
},
|
|
815
|
-
"type": {
|
|
816
|
-
"type": "string",
|
|
817
|
-
"enum": [
|
|
818
|
-
"counter",
|
|
819
|
-
"gauge",
|
|
820
|
-
"histogram",
|
|
821
|
-
"summary"
|
|
822
|
-
],
|
|
823
|
-
"description": "Metric type."
|
|
824
|
-
},
|
|
825
|
-
"description": {
|
|
826
|
-
"type": "string",
|
|
827
|
-
"description": "Metric description."
|
|
828
|
-
},
|
|
829
|
-
"labels": {
|
|
830
|
-
"type": "array",
|
|
831
|
-
"items": {
|
|
832
|
-
"type": "string"
|
|
833
|
-
},
|
|
834
|
-
"description": "Metric labels."
|
|
835
|
-
}
|
|
836
|
-
},
|
|
837
|
-
"required": [
|
|
838
|
-
"name",
|
|
839
|
-
"type"
|
|
840
|
-
],
|
|
841
|
-
"additionalProperties": false
|
|
842
|
-
},
|
|
843
|
-
"Deployment": {
|
|
844
|
-
"type": "object",
|
|
845
|
-
"description": "Deployment configuration for the environment.",
|
|
846
|
-
"properties": {
|
|
847
|
-
"kubernetes": {
|
|
848
|
-
"$ref": "#/$defs/KubernetesConfig"
|
|
849
|
-
},
|
|
850
|
-
"docker": {
|
|
851
|
-
"$ref": "#/$defs/DockerConfig"
|
|
852
|
-
},
|
|
853
|
-
"replicas": {
|
|
854
|
-
"type": "integer",
|
|
855
|
-
"minimum": 1,
|
|
856
|
-
"description": "Number of replicas."
|
|
857
|
-
},
|
|
858
|
-
"resources": {
|
|
859
|
-
"$ref": "#/$defs/Resources"
|
|
860
|
-
}
|
|
861
|
-
},
|
|
862
|
-
"additionalProperties": false
|
|
863
|
-
},
|
|
864
|
-
"KubernetesConfig": {
|
|
865
|
-
"type": "object",
|
|
866
|
-
"properties": {
|
|
867
|
-
"namespace": {
|
|
868
|
-
"type": "string",
|
|
869
|
-
"description": "Kubernetes namespace."
|
|
870
|
-
},
|
|
871
|
-
"image": {
|
|
872
|
-
"type": "string",
|
|
873
|
-
"description": "Container image."
|
|
874
|
-
},
|
|
875
|
-
"port": {
|
|
876
|
-
"type": "integer",
|
|
877
|
-
"description": "Container port."
|
|
878
|
-
},
|
|
879
|
-
"serviceType": {
|
|
880
|
-
"type": "string",
|
|
881
|
-
"enum": [
|
|
882
|
-
"ClusterIP",
|
|
883
|
-
"NodePort",
|
|
884
|
-
"LoadBalancer"
|
|
885
|
-
],
|
|
886
|
-
"description": "Kubernetes service type."
|
|
887
|
-
},
|
|
888
|
-
"ingress": {
|
|
889
|
-
"type": "object",
|
|
890
|
-
"properties": {
|
|
891
|
-
"host": {
|
|
892
|
-
"type": "string",
|
|
893
|
-
"description": "Ingress host."
|
|
894
|
-
},
|
|
895
|
-
"path": {
|
|
896
|
-
"type": "string",
|
|
897
|
-
"description": "Ingress path."
|
|
898
|
-
},
|
|
899
|
-
"tls": {
|
|
900
|
-
"type": "boolean",
|
|
901
|
-
"description": "Whether TLS is enabled."
|
|
902
|
-
}
|
|
903
|
-
},
|
|
904
|
-
"additionalProperties": false
|
|
905
|
-
}
|
|
906
|
-
},
|
|
907
|
-
"additionalProperties": false
|
|
908
|
-
},
|
|
909
|
-
"DockerConfig": {
|
|
910
|
-
"type": "object",
|
|
911
|
-
"properties": {
|
|
912
|
-
"image": {
|
|
913
|
-
"type": "string",
|
|
914
|
-
"description": "Docker image."
|
|
915
|
-
},
|
|
916
|
-
"port": {
|
|
917
|
-
"type": "integer",
|
|
918
|
-
"description": "Container port."
|
|
919
|
-
},
|
|
920
|
-
"environment": {
|
|
921
|
-
"type": "object",
|
|
922
|
-
"additionalProperties": {
|
|
923
|
-
"type": "string"
|
|
924
|
-
},
|
|
925
|
-
"description": "Environment variables."
|
|
926
|
-
},
|
|
927
|
-
"volumes": {
|
|
928
|
-
"type": "array",
|
|
929
|
-
"items": {
|
|
930
|
-
"type": "string"
|
|
931
|
-
},
|
|
932
|
-
"description": "Volume mounts."
|
|
933
|
-
}
|
|
934
|
-
},
|
|
935
|
-
"additionalProperties": false
|
|
936
|
-
},
|
|
937
|
-
"Resources": {
|
|
938
|
-
"type": "object",
|
|
939
|
-
"properties": {
|
|
940
|
-
"cpu": {
|
|
941
|
-
"type": "string",
|
|
942
|
-
"description": "CPU request/limit."
|
|
943
|
-
},
|
|
944
|
-
"memory": {
|
|
945
|
-
"type": "string",
|
|
946
|
-
"description": "Memory request/limit."
|
|
947
|
-
},
|
|
948
|
-
"storage": {
|
|
949
|
-
"type": "string",
|
|
950
|
-
"description": "Storage request/limit."
|
|
951
|
-
}
|
|
952
|
-
},
|
|
953
|
-
"additionalProperties": false
|
|
954
|
-
},
|
|
955
|
-
"Audit": {
|
|
956
|
-
"type": "object",
|
|
957
|
-
"description": "Audit configuration for compliance.",
|
|
958
|
-
"properties": {
|
|
959
|
-
"enabled": {
|
|
960
|
-
"type": "boolean",
|
|
961
|
-
"description": "Whether audit logging is enabled."
|
|
962
|
-
},
|
|
963
|
-
"retention": {
|
|
964
|
-
"type": "string",
|
|
965
|
-
"description": "Audit log retention period."
|
|
966
|
-
},
|
|
967
|
-
"fields": {
|
|
968
|
-
"type": "array",
|
|
969
|
-
"items": {
|
|
970
|
-
"type": "string"
|
|
971
|
-
},
|
|
972
|
-
"description": "Fields to include in audit logs."
|
|
973
|
-
},
|
|
974
|
-
"export": {
|
|
975
|
-
"type": "object",
|
|
976
|
-
"properties": {
|
|
977
|
-
"format": {
|
|
978
|
-
"type": "string",
|
|
979
|
-
"enum": [
|
|
980
|
-
"json",
|
|
981
|
-
"csv"
|
|
982
|
-
],
|
|
983
|
-
"description": "Export format."
|
|
984
|
-
},
|
|
985
|
-
"destination": {
|
|
986
|
-
"type": "string",
|
|
987
|
-
"description": "Export destination."
|
|
988
|
-
}
|
|
989
|
-
},
|
|
990
|
-
"additionalProperties": false
|
|
991
|
-
}
|
|
992
|
-
},
|
|
993
|
-
"additionalProperties": false
|
|
994
|
-
}
|
|
995
|
-
},
|
|
996
|
-
"additionalProperties": false
|
|
997
|
-
},
|
|
998
|
-
subschemas: [
|
|
999
|
-
{
|
|
1000
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1001
|
-
"$id": "https://unispec.dev/schema/types/common.schema.json",
|
|
1002
|
-
"title": "Common UniSpec definitions",
|
|
1003
|
-
"$defs": {
|
|
1004
|
-
"Identifier": {
|
|
1005
|
-
"type": "string",
|
|
1006
|
-
"description": "Identifier for services, operations, channels, etc.",
|
|
1007
|
-
"pattern": "^[A-Za-z_][A-Za-z0-9_.:-]*$"
|
|
1008
|
-
},
|
|
1009
|
-
"Description": {
|
|
1010
|
-
"type": "string",
|
|
1011
|
-
"description": "Human-readable description text."
|
|
1012
|
-
},
|
|
1013
|
-
"Email": {
|
|
1014
|
-
"type": "string",
|
|
1015
|
-
"description": "Email address with validation.",
|
|
1016
|
-
"format": "email",
|
|
1017
|
-
"pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
|
|
1018
|
-
},
|
|
1019
|
-
"Url": {
|
|
1020
|
-
"type": "string",
|
|
1021
|
-
"description": "URL with validation.",
|
|
1022
|
-
"format": "uri",
|
|
1023
|
-
"pattern": "^https?://[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}.*$"
|
|
1024
|
-
},
|
|
1025
|
-
"Version": {
|
|
1026
|
-
"type": "string",
|
|
1027
|
-
"description": "Semantic version string (SemVer).",
|
|
1028
|
-
"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
|
-
},
|
|
1030
|
-
"Tag": {
|
|
1031
|
-
"type": "string",
|
|
1032
|
-
"description": "Tag for grouping operations and resources.",
|
|
1033
|
-
"pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
|
|
1034
|
-
},
|
|
1035
|
-
"SecurityScheme": {
|
|
1036
|
-
"type": "object",
|
|
1037
|
-
"discriminator": {
|
|
1038
|
-
"propertyName": "type"
|
|
1039
|
-
},
|
|
1040
|
-
"oneOf": [
|
|
1041
|
-
{
|
|
1042
|
-
"$ref": "#/$defs/ApiKeyScheme"
|
|
1043
|
-
},
|
|
1044
|
-
{
|
|
1045
|
-
"$ref": "#/$defs/HttpScheme"
|
|
1046
|
-
},
|
|
1047
|
-
{
|
|
1048
|
-
"$ref": "#/$defs/OAuth2Scheme"
|
|
1049
|
-
},
|
|
1050
|
-
{
|
|
1051
|
-
"$ref": "#/$defs/JwtScheme"
|
|
1052
|
-
}
|
|
1053
|
-
]
|
|
1054
|
-
},
|
|
1055
|
-
"ApiKeyScheme": {
|
|
1056
|
-
"type": "object",
|
|
1057
|
-
"properties": {
|
|
1058
|
-
"type": {
|
|
1059
|
-
"const": "apiKey"
|
|
1060
|
-
},
|
|
1061
|
-
"name": {
|
|
1062
|
-
"type": "string",
|
|
1063
|
-
"description": "Name of the API key header or query parameter."
|
|
1064
|
-
},
|
|
1065
|
-
"in": {
|
|
1066
|
-
"type": "string",
|
|
1067
|
-
"enum": [
|
|
1068
|
-
"header",
|
|
1069
|
-
"query",
|
|
1070
|
-
"cookie"
|
|
1071
|
-
],
|
|
1072
|
-
"description": "Location of the API key."
|
|
1073
|
-
},
|
|
1074
|
-
"description": {
|
|
1075
|
-
"type": "string",
|
|
1076
|
-
"description": "Description of the API key usage."
|
|
1077
|
-
}
|
|
1078
|
-
},
|
|
1079
|
-
"required": [
|
|
1080
|
-
"type",
|
|
1081
|
-
"name",
|
|
1082
|
-
"in"
|
|
1083
|
-
],
|
|
1084
|
-
"additionalProperties": false
|
|
1085
|
-
},
|
|
1086
|
-
"HttpScheme": {
|
|
1087
|
-
"type": "object",
|
|
1088
|
-
"properties": {
|
|
1089
|
-
"type": {
|
|
1090
|
-
"const": "http"
|
|
1091
|
-
},
|
|
1092
|
-
"scheme": {
|
|
1093
|
-
"type": "string",
|
|
1094
|
-
"enum": [
|
|
1095
|
-
"basic",
|
|
1096
|
-
"bearer",
|
|
1097
|
-
"digest"
|
|
1098
|
-
],
|
|
1099
|
-
"description": "HTTP authentication scheme."
|
|
1100
|
-
},
|
|
1101
|
-
"bearerFormat": {
|
|
1102
|
-
"type": "string",
|
|
1103
|
-
"description": "Format of the bearer token (e.g., JWT)."
|
|
1104
|
-
},
|
|
1105
|
-
"description": {
|
|
1106
|
-
"type": "string",
|
|
1107
|
-
"description": "Description of the HTTP authentication scheme."
|
|
1108
|
-
}
|
|
1109
|
-
},
|
|
1110
|
-
"required": [
|
|
1111
|
-
"type",
|
|
1112
|
-
"scheme"
|
|
1113
|
-
],
|
|
1114
|
-
"additionalProperties": false
|
|
1115
|
-
},
|
|
1116
|
-
"OAuth2Scheme": {
|
|
1117
|
-
"type": "object",
|
|
1118
|
-
"properties": {
|
|
1119
|
-
"type": {
|
|
1120
|
-
"const": "oauth2"
|
|
1121
|
-
},
|
|
1122
|
-
"flows": {
|
|
1123
|
-
"type": "object",
|
|
1124
|
-
"description": "OAuth2 authorization flows.",
|
|
1125
|
-
"properties": {
|
|
1126
|
-
"authorizationCode": {
|
|
1127
|
-
"$ref": "#/$defs/OAuth2Flow"
|
|
1128
|
-
},
|
|
1129
|
-
"clientCredentials": {
|
|
1130
|
-
"$ref": "#/$defs/OAuth2Flow"
|
|
1131
|
-
},
|
|
1132
|
-
"implicit": {
|
|
1133
|
-
"$ref": "#/$defs/OAuth2Flow"
|
|
1134
|
-
}
|
|
1135
|
-
},
|
|
1136
|
-
"additionalProperties": false
|
|
1137
|
-
},
|
|
1138
|
-
"description": {
|
|
1139
|
-
"type": "string",
|
|
1140
|
-
"description": "Description of the OAuth2 scheme."
|
|
1141
|
-
}
|
|
1142
|
-
},
|
|
1143
|
-
"required": [
|
|
1144
|
-
"type",
|
|
1145
|
-
"flows"
|
|
1146
|
-
],
|
|
1147
|
-
"additionalProperties": false
|
|
1148
|
-
},
|
|
1149
|
-
"JwtScheme": {
|
|
1150
|
-
"type": "object",
|
|
1151
|
-
"properties": {
|
|
1152
|
-
"type": {
|
|
1153
|
-
"const": "jwt"
|
|
1154
|
-
},
|
|
1155
|
-
"issuer": {
|
|
1156
|
-
"type": "string",
|
|
1157
|
-
"description": "JWT issuer URL."
|
|
1158
|
-
},
|
|
1159
|
-
"audience": {
|
|
1160
|
-
"type": "array",
|
|
1161
|
-
"items": {
|
|
1162
|
-
"type": "string"
|
|
1163
|
-
},
|
|
1164
|
-
"description": "Allowed JWT audiences."
|
|
1165
|
-
},
|
|
1166
|
-
"algorithms": {
|
|
1167
|
-
"type": "array",
|
|
1168
|
-
"items": {
|
|
1169
|
-
"type": "string"
|
|
1170
|
-
},
|
|
1171
|
-
"description": "Allowed JWT algorithms."
|
|
1172
|
-
},
|
|
1173
|
-
"description": {
|
|
1174
|
-
"type": "string",
|
|
1175
|
-
"description": "Description of the JWT scheme."
|
|
1176
|
-
}
|
|
1177
|
-
},
|
|
1178
|
-
"required": [
|
|
1179
|
-
"type"
|
|
1180
|
-
],
|
|
1181
|
-
"additionalProperties": false
|
|
1182
|
-
},
|
|
1183
|
-
"OAuth2Flow": {
|
|
1184
|
-
"type": "object",
|
|
1185
|
-
"properties": {
|
|
1186
|
-
"authorizationUrl": {
|
|
1187
|
-
"type": "string",
|
|
1188
|
-
"format": "uri",
|
|
1189
|
-
"description": "Authorization URL."
|
|
1190
|
-
},
|
|
1191
|
-
"tokenUrl": {
|
|
1192
|
-
"type": "string",
|
|
1193
|
-
"format": "uri",
|
|
1194
|
-
"description": "Token URL."
|
|
1195
|
-
},
|
|
1196
|
-
"refreshUrl": {
|
|
1197
|
-
"type": "string",
|
|
1198
|
-
"format": "uri",
|
|
1199
|
-
"description": "Refresh token URL."
|
|
1200
|
-
},
|
|
1201
|
-
"scopes": {
|
|
1202
|
-
"type": "object",
|
|
1203
|
-
"description": "Available scopes.",
|
|
1204
|
-
"additionalProperties": {
|
|
1205
|
-
"type": "string"
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
},
|
|
1209
|
-
"required": [
|
|
1210
|
-
"authorizationUrl",
|
|
1211
|
-
"tokenUrl",
|
|
1212
|
-
"scopes"
|
|
1213
|
-
],
|
|
1214
|
-
"additionalProperties": false
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
},
|
|
1218
|
-
{
|
|
1219
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1220
|
-
"$id": "https://unispec.dev/schema/types/graphql.schema.json",
|
|
1221
|
-
"title": "GraphQL API surface",
|
|
1222
|
-
"type": "object",
|
|
1223
|
-
"$defs": {
|
|
1224
|
-
"Argument": {
|
|
1225
|
-
"type": "object",
|
|
1226
|
-
"required": [
|
|
1227
|
-
"name",
|
|
1228
|
-
"type"
|
|
1229
|
-
],
|
|
1230
|
-
"properties": {
|
|
1231
|
-
"name": {
|
|
1232
|
-
"type": "string",
|
|
1233
|
-
"description": "Argument name as it appears in the GraphQL operation."
|
|
1234
|
-
},
|
|
1235
|
-
"type": {
|
|
1236
|
-
"type": "string",
|
|
1237
|
-
"description": "GraphQL type string (e.g., 'ID!', '[User]', 'PostFilter')."
|
|
1238
|
-
},
|
|
1239
|
-
"description": {
|
|
1240
|
-
"type": "string",
|
|
1241
|
-
"description": "Human-readable description of the argument."
|
|
1242
|
-
},
|
|
1243
|
-
"defaultValue": {
|
|
1244
|
-
"description": "Default value for the argument (any JSON value)."
|
|
1245
|
-
},
|
|
1246
|
-
"deprecated": {
|
|
1247
|
-
"type": "boolean",
|
|
1248
|
-
"description": "Marks the argument as deprecated.",
|
|
1249
|
-
"default": false
|
|
1250
|
-
},
|
|
1251
|
-
"deprecationReason": {
|
|
1252
|
-
"type": "string",
|
|
1253
|
-
"description": "Human-readable reason for deprecation."
|
|
1254
|
-
}
|
|
1255
|
-
},
|
|
1256
|
-
"additionalProperties": false
|
|
1257
|
-
},
|
|
1258
|
-
"SecurityRequirement": {
|
|
1259
|
-
"type": "array",
|
|
1260
|
-
"description": "Alternative set of named security schemes applied to an operation.",
|
|
1261
|
-
"items": {
|
|
1262
|
-
"$ref": "./common.schema.json#/$defs/Identifier"
|
|
1263
|
-
}
|
|
1264
|
-
},
|
|
1265
|
-
"Header": {
|
|
1266
|
-
"type": "object",
|
|
1267
|
-
"required": [
|
|
1268
|
-
"name"
|
|
1269
|
-
],
|
|
1270
|
-
"properties": {
|
|
1271
|
-
"name": {
|
|
1272
|
-
"type": "string",
|
|
1273
|
-
"description": "Header name (case-insensitive)."
|
|
1274
|
-
},
|
|
1275
|
-
"description": {
|
|
1276
|
-
"type": "string",
|
|
1277
|
-
"description": "Human-readable description of the header."
|
|
1278
|
-
},
|
|
1279
|
-
"required": {
|
|
1280
|
-
"type": "boolean",
|
|
1281
|
-
"description": "Whether this header is required.",
|
|
1282
|
-
"default": false
|
|
1283
|
-
},
|
|
1284
|
-
"defaultValue": {
|
|
1285
|
-
"type": "string",
|
|
1286
|
-
"description": "Default value for the header."
|
|
1287
|
-
}
|
|
1288
|
-
},
|
|
1289
|
-
"additionalProperties": false
|
|
1290
|
-
},
|
|
1291
|
-
"Operation": {
|
|
1292
|
-
"type": "object",
|
|
1293
|
-
"required": [
|
|
1294
|
-
"name"
|
|
1295
|
-
],
|
|
1296
|
-
"properties": {
|
|
1297
|
-
"name": {
|
|
1298
|
-
"$ref": "./common.schema.json#/$defs/Identifier"
|
|
1299
|
-
},
|
|
1300
|
-
"description": {
|
|
1301
|
-
"$ref": "./common.schema.json#/$defs/Description"
|
|
1302
|
-
},
|
|
1303
|
-
"tags": {
|
|
1304
|
-
"type": "array",
|
|
1305
|
-
"description": "Tags for grouping operations.",
|
|
1306
|
-
"items": {
|
|
1307
|
-
"$ref": "./common.schema.json#/$defs/Tag"
|
|
1308
|
-
}
|
|
1309
|
-
},
|
|
1310
|
-
"deprecated": {
|
|
1311
|
-
"type": "boolean",
|
|
1312
|
-
"description": "Marks the operation as deprecated.",
|
|
1313
|
-
"default": false
|
|
1314
|
-
},
|
|
1315
|
-
"deprecationReason": {
|
|
1316
|
-
"type": "string",
|
|
1317
|
-
"description": "Human-readable reason for deprecation."
|
|
1318
|
-
},
|
|
1319
|
-
"args": {
|
|
1320
|
-
"type": "array",
|
|
1321
|
-
"description": "Arguments for this GraphQL operation.",
|
|
1322
|
-
"items": {
|
|
1323
|
-
"$ref": "#/$defs/Argument"
|
|
1324
|
-
}
|
|
1325
|
-
},
|
|
1326
|
-
"returnType": {
|
|
1327
|
-
"type": "string",
|
|
1328
|
-
"description": "GraphQL return type (e.g., 'User!', '[User]')."
|
|
1329
|
-
},
|
|
1330
|
-
"headers": {
|
|
1331
|
-
"type": "array",
|
|
1332
|
-
"description": "HTTP headers relevant for this operation.",
|
|
1333
|
-
"items": {
|
|
1334
|
-
"$ref": "#/$defs/Header"
|
|
1335
|
-
}
|
|
1336
|
-
},
|
|
1337
|
-
"security": {
|
|
1338
|
-
"type": "array",
|
|
1339
|
-
"description": "Security requirements for this operation. Each item represents an alternative set of named security schemes.",
|
|
1340
|
-
"items": {
|
|
1341
|
-
"$ref": "#/$defs/SecurityRequirement"
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
},
|
|
1345
|
-
"additionalProperties": false
|
|
1346
|
-
}
|
|
1347
|
-
},
|
|
1348
|
-
"properties": {
|
|
1349
|
-
"url": {
|
|
1350
|
-
"type": "string",
|
|
1351
|
-
"description": "Optional path or URL of the GraphQL endpoint. Recommended: relative path (e.g. '/graphql'). Absolute URLs are allowed only if the service is tightly bound to a single host. If omitted, tooling may assume a framework default (commonly '/graphql')."
|
|
1352
|
-
},
|
|
1353
|
-
"schema": {
|
|
1354
|
-
"type": "string",
|
|
1355
|
-
"description": "GraphQL schema SDL as a string. Canonical source of type definitions."
|
|
1356
|
-
},
|
|
1357
|
-
"securitySchemes": {
|
|
1358
|
-
"type": "object",
|
|
1359
|
-
"description": "Authentication mechanisms available for this GraphQL surface.",
|
|
1360
|
-
"additionalProperties": {
|
|
1361
|
-
"type": "object",
|
|
1362
|
-
"description": "Security scheme definition (shape is intentionally flexible and may evolve).",
|
|
1363
|
-
"additionalProperties": true
|
|
1364
|
-
}
|
|
1365
|
-
},
|
|
1366
|
-
"headers": {
|
|
1367
|
-
"type": "array",
|
|
1368
|
-
"description": "HTTP headers commonly used for GraphQL requests.",
|
|
1369
|
-
"items": {
|
|
1370
|
-
"$ref": "#/$defs/Header"
|
|
1371
|
-
}
|
|
1372
|
-
},
|
|
1373
|
-
"queries": {
|
|
1374
|
-
"type": "array",
|
|
1375
|
-
"description": "Query operations exposed by the GraphQL API.",
|
|
1376
|
-
"items": {
|
|
1377
|
-
"$ref": "#/$defs/Operation"
|
|
1378
|
-
}
|
|
1379
|
-
},
|
|
1380
|
-
"mutations": {
|
|
1381
|
-
"type": "array",
|
|
1382
|
-
"description": "Mutation operations exposed by the GraphQL API.",
|
|
1383
|
-
"items": {
|
|
1384
|
-
"$ref": "#/$defs/Operation"
|
|
1385
|
-
}
|
|
1386
|
-
},
|
|
1387
|
-
"subscriptions": {
|
|
1388
|
-
"type": "array",
|
|
1389
|
-
"description": "Subscription operations exposed by the GraphQL API.",
|
|
1390
|
-
"items": {
|
|
1391
|
-
"$ref": "#/$defs/Operation"
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
},
|
|
1395
|
-
"additionalProperties": false
|
|
1396
|
-
},
|
|
1397
|
-
{
|
|
1398
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1399
|
-
"$id": "https://unispec.dev/schema/types/rest.schema.json",
|
|
1400
|
-
"title": "REST API surface",
|
|
1401
|
-
"type": "object",
|
|
1402
|
-
"$defs": {
|
|
1403
|
-
"Route": {
|
|
1404
|
-
"type": "object",
|
|
1405
|
-
"required": [
|
|
1406
|
-
"path",
|
|
1407
|
-
"method"
|
|
1408
|
-
],
|
|
1409
|
-
"properties": {
|
|
1410
|
-
"name": {
|
|
1411
|
-
"$ref": "./common.schema.json#/$defs/Identifier"
|
|
1412
|
-
},
|
|
1413
|
-
"summary": {
|
|
1414
|
-
"type": "string",
|
|
1415
|
-
"description": "Short, human-readable summary of the route."
|
|
1416
|
-
},
|
|
1417
|
-
"tags": {
|
|
1418
|
-
"type": "array",
|
|
1419
|
-
"description": "Tags for grouping operations.",
|
|
1420
|
-
"items": {
|
|
1421
|
-
"$ref": "./common.schema.json#/$defs/Tag"
|
|
1422
|
-
}
|
|
1423
|
-
},
|
|
1424
|
-
"deprecated": {
|
|
1425
|
-
"type": "boolean",
|
|
1426
|
-
"description": "Marks the route as deprecated.",
|
|
1427
|
-
"default": false
|
|
1428
|
-
},
|
|
1429
|
-
"deprecationReason": {
|
|
1430
|
-
"type": "string",
|
|
1431
|
-
"description": "Human-readable reason for deprecation."
|
|
1432
|
-
},
|
|
1433
|
-
"description": {
|
|
1434
|
-
"$ref": "./common.schema.json#/$defs/Description"
|
|
1435
|
-
},
|
|
1436
|
-
"path": {
|
|
1437
|
-
"type": "string",
|
|
1438
|
-
"description": "URL path template, e.g. /users/{id}."
|
|
1439
|
-
},
|
|
1440
|
-
"method": {
|
|
1441
|
-
"type": "string",
|
|
1442
|
-
"description": "HTTP method in upper-case.",
|
|
1443
|
-
"enum": [
|
|
1444
|
-
"GET",
|
|
1445
|
-
"POST",
|
|
1446
|
-
"PUT",
|
|
1447
|
-
"PATCH",
|
|
1448
|
-
"DELETE"
|
|
1449
|
-
]
|
|
1450
|
-
},
|
|
1451
|
-
"pathParams": {
|
|
1452
|
-
"type": "array",
|
|
1453
|
-
"description": "Path parameters bound from the URL template.",
|
|
1454
|
-
"items": {
|
|
1455
|
-
"$ref": "#/$defs/Parameter"
|
|
1456
|
-
}
|
|
1457
|
-
},
|
|
1458
|
-
"queryParams": {
|
|
1459
|
-
"type": "array",
|
|
1460
|
-
"description": "Query string parameters.",
|
|
1461
|
-
"items": {
|
|
1462
|
-
"$ref": "#/$defs/Parameter"
|
|
1463
|
-
}
|
|
1464
|
-
},
|
|
1465
|
-
"headers": {
|
|
1466
|
-
"type": "array",
|
|
1467
|
-
"description": "HTTP headers relevant for this route.",
|
|
1468
|
-
"items": {
|
|
1469
|
-
"$ref": "#/$defs/Parameter"
|
|
1470
|
-
}
|
|
1471
|
-
},
|
|
1472
|
-
"requestBody": {
|
|
1473
|
-
"$ref": "#/$defs/RequestBody"
|
|
1474
|
-
},
|
|
1475
|
-
"responses": {
|
|
1476
|
-
"type": "object",
|
|
1477
|
-
"description": "HTTP responses keyed by status code (e.g. '200', '404').",
|
|
1478
|
-
"additionalProperties": {
|
|
1479
|
-
"$ref": "#/$defs/Response"
|
|
1480
|
-
}
|
|
1481
|
-
},
|
|
1482
|
-
"security": {
|
|
1483
|
-
"type": "array",
|
|
1484
|
-
"description": "Security requirements for this route. Each item represents an alternative set of named security schemes.",
|
|
1485
|
-
"items": {
|
|
1486
|
-
"$ref": "#/$defs/SecurityRequirement"
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
},
|
|
1490
|
-
"additionalProperties": false
|
|
1491
|
-
},
|
|
1492
|
-
"SecurityRequirement": {
|
|
1493
|
-
"type": "array",
|
|
1494
|
-
"description": "Alternative set of named security schemes applied to an operation.",
|
|
1495
|
-
"items": {
|
|
1496
|
-
"$ref": "./common.schema.json#/$defs/Identifier"
|
|
1497
|
-
}
|
|
1498
|
-
},
|
|
1499
|
-
"Parameter": {
|
|
1500
|
-
"type": "object",
|
|
1501
|
-
"required": [
|
|
1502
|
-
"name"
|
|
1503
|
-
],
|
|
1504
|
-
"properties": {
|
|
1505
|
-
"name": {
|
|
1506
|
-
"type": "string",
|
|
1507
|
-
"description": "Parameter name as it appears in the API."
|
|
1508
|
-
},
|
|
1509
|
-
"description": {
|
|
1510
|
-
"$ref": "./common.schema.json#/$defs/Description"
|
|
1511
|
-
},
|
|
1512
|
-
"required": {
|
|
1513
|
-
"type": "boolean",
|
|
1514
|
-
"description": "Whether this parameter is required.",
|
|
1515
|
-
"default": false
|
|
1516
|
-
},
|
|
1517
|
-
"schemaRef": {
|
|
1518
|
-
"type": "string",
|
|
1519
|
-
"description": "Reference to a reusable schema defined in service.schemas. Recommended format: <SchemaName> (where SchemaName is a key in service.schemas). Tools may also accept a JSON Pointer in the form #/service/schemas/<SchemaName>."
|
|
1520
|
-
}
|
|
1521
|
-
},
|
|
1522
|
-
"additionalProperties": false
|
|
1523
|
-
},
|
|
1524
|
-
"MediaType": {
|
|
1525
|
-
"type": "object",
|
|
1526
|
-
"properties": {
|
|
1527
|
-
"schemaRef": {
|
|
1528
|
-
"type": "string",
|
|
1529
|
-
"description": "Reference to a reusable schema defined in service.schemas used as the content payload. Recommended format: <SchemaName> (where SchemaName is a key in service.schemas). Tools may also accept a JSON Pointer in the form #/service/schemas/<SchemaName>."
|
|
1530
|
-
}
|
|
1531
|
-
},
|
|
1532
|
-
"additionalProperties": false
|
|
1533
|
-
},
|
|
1534
|
-
"Content": {
|
|
1535
|
-
"type": "object",
|
|
1536
|
-
"description": "Content keyed by media type, e.g. 'application/json'.",
|
|
1537
|
-
"additionalProperties": {
|
|
1538
|
-
"$ref": "#/$defs/MediaType"
|
|
1539
|
-
}
|
|
1540
|
-
},
|
|
1541
|
-
"RequestBody": {
|
|
1542
|
-
"type": "object",
|
|
1543
|
-
"properties": {
|
|
1544
|
-
"description": {
|
|
1545
|
-
"$ref": "./common.schema.json#/$defs/Description"
|
|
1546
|
-
},
|
|
1547
|
-
"required": {
|
|
1548
|
-
"type": "boolean",
|
|
1549
|
-
"description": "Whether a request body is required.",
|
|
1550
|
-
"default": false
|
|
1551
|
-
},
|
|
1552
|
-
"content": {
|
|
1553
|
-
"$ref": "#/$defs/Content"
|
|
1554
|
-
}
|
|
1555
|
-
},
|
|
1556
|
-
"additionalProperties": false
|
|
1557
|
-
},
|
|
1558
|
-
"Response": {
|
|
1559
|
-
"type": "object",
|
|
1560
|
-
"properties": {
|
|
1561
|
-
"description": {
|
|
1562
|
-
"$ref": "./common.schema.json#/$defs/Description"
|
|
1563
|
-
},
|
|
1564
|
-
"headers": {
|
|
1565
|
-
"type": "array",
|
|
1566
|
-
"description": "HTTP headers returned in this response.",
|
|
1567
|
-
"items": {
|
|
1568
|
-
"$ref": "#/$defs/ResponseHeader"
|
|
1569
|
-
}
|
|
1570
|
-
},
|
|
1571
|
-
"content": {
|
|
1572
|
-
"$ref": "#/$defs/Content"
|
|
1573
|
-
}
|
|
1574
|
-
},
|
|
1575
|
-
"additionalProperties": false
|
|
1576
|
-
},
|
|
1577
|
-
"ResponseHeader": {
|
|
1578
|
-
"type": "object",
|
|
1579
|
-
"required": [
|
|
1580
|
-
"name"
|
|
1581
|
-
],
|
|
1582
|
-
"properties": {
|
|
1583
|
-
"name": {
|
|
1584
|
-
"type": "string",
|
|
1585
|
-
"description": "Header name (case-insensitive)."
|
|
1586
|
-
},
|
|
1587
|
-
"description": {
|
|
1588
|
-
"type": "string",
|
|
1589
|
-
"description": "Human-readable description of the header."
|
|
1590
|
-
},
|
|
1591
|
-
"required": {
|
|
1592
|
-
"type": "boolean",
|
|
1593
|
-
"description": "Whether this header is required in the response.",
|
|
1594
|
-
"default": false
|
|
1595
|
-
},
|
|
1596
|
-
"schemaRef": {
|
|
1597
|
-
"type": "string",
|
|
1598
|
-
"description": "Reference to a reusable schema for header value validation. Recommended format: <SchemaName> (where SchemaName is a key in service.schemas). Tools may also accept a JSON Pointer in the form #/service/schemas/<SchemaName>."
|
|
1599
|
-
}
|
|
1600
|
-
},
|
|
1601
|
-
"additionalProperties": false
|
|
1602
|
-
}
|
|
1603
|
-
},
|
|
1604
|
-
"properties": {
|
|
1605
|
-
"headers": {
|
|
1606
|
-
"type": "array",
|
|
1607
|
-
"description": "HTTP headers commonly used for REST requests.",
|
|
1608
|
-
"items": {
|
|
1609
|
-
"$ref": "#/$defs/Parameter"
|
|
1610
|
-
}
|
|
1611
|
-
},
|
|
1612
|
-
"routes": {
|
|
1613
|
-
"type": "array",
|
|
1614
|
-
"description": "List of REST routes exposed by the service.",
|
|
1615
|
-
"items": {
|
|
1616
|
-
"$ref": "#/$defs/Route"
|
|
1617
|
-
}
|
|
1618
|
-
},
|
|
1619
|
-
"securitySchemes": {
|
|
1620
|
-
"type": "object",
|
|
1621
|
-
"description": "Authentication mechanisms available for this REST surface.",
|
|
1622
|
-
"additionalProperties": {
|
|
1623
|
-
"type": "object",
|
|
1624
|
-
"description": "Security scheme definition (shape is intentionally flexible and may evolve).",
|
|
1625
|
-
"additionalProperties": true
|
|
1626
|
-
}
|
|
1627
|
-
}
|
|
1628
|
-
},
|
|
1629
|
-
"additionalProperties": false
|
|
1630
|
-
},
|
|
1631
|
-
{
|
|
1632
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1633
|
-
"$id": "https://unispec.dev/schema/types/schemas.schema.json",
|
|
1634
|
-
"title": "Reusable data schemas",
|
|
1635
|
-
"description": "Container for reusable data model definitions (request/response bodies, messages, etc.).",
|
|
1636
|
-
"type": "object",
|
|
1637
|
-
"additionalProperties": {
|
|
1638
|
-
"$ref": "#/$defs/SchemaDefinition"
|
|
1639
|
-
},
|
|
1640
|
-
"$defs": {
|
|
1641
|
-
"SchemaDefinition": {
|
|
1642
|
-
"type": "object",
|
|
1643
|
-
"description": "Named reusable data schema definition.",
|
|
1644
|
-
"properties": {
|
|
1645
|
-
"description": {
|
|
1646
|
-
"$ref": "./common.schema.json#/$defs/Description"
|
|
1647
|
-
},
|
|
1648
|
-
"deprecated": {
|
|
1649
|
-
"type": "boolean",
|
|
1650
|
-
"description": "Marks the schema as deprecated.",
|
|
1651
|
-
"default": false
|
|
1652
|
-
},
|
|
1653
|
-
"deprecationReason": {
|
|
1654
|
-
"type": "string",
|
|
1655
|
-
"description": "Human-readable reason for deprecation."
|
|
1656
|
-
},
|
|
1657
|
-
"examples": {
|
|
1658
|
-
"type": "array",
|
|
1659
|
-
"description": "Example values for this schema.",
|
|
1660
|
-
"items": {
|
|
1661
|
-
"description": "Example value (any JSON value)."
|
|
1662
|
-
}
|
|
1663
|
-
},
|
|
1664
|
-
"jsonSchema": {
|
|
1665
|
-
"type": "object",
|
|
1666
|
-
"description": "Embedded JSON Schema Draft 2020-12 definition for this type.",
|
|
1667
|
-
"additionalProperties": true
|
|
1668
|
-
},
|
|
1669
|
-
"validation": {
|
|
1670
|
-
"type": "object",
|
|
1671
|
-
"description": "Additional validation rules for this schema.",
|
|
1672
|
-
"properties": {
|
|
1673
|
-
"strict": {
|
|
1674
|
-
"type": "boolean",
|
|
1675
|
-
"description": "Whether to apply strict validation.",
|
|
1676
|
-
"default": false
|
|
1677
|
-
},
|
|
1678
|
-
"additionalProperties": {
|
|
1679
|
-
"type": "boolean",
|
|
1680
|
-
"description": "Whether additional properties are allowed.",
|
|
1681
|
-
"default": true
|
|
1682
|
-
},
|
|
1683
|
-
"customValidators": {
|
|
1684
|
-
"type": "array",
|
|
1685
|
-
"items": {
|
|
1686
|
-
"type": "object",
|
|
1687
|
-
"properties": {
|
|
1688
|
-
"name": {
|
|
1689
|
-
"type": "string",
|
|
1690
|
-
"description": "Validator name."
|
|
1691
|
-
},
|
|
1692
|
-
"rule": {
|
|
1693
|
-
"type": "string",
|
|
1694
|
-
"description": "Validation rule expression."
|
|
1695
|
-
},
|
|
1696
|
-
"message": {
|
|
1697
|
-
"type": "string",
|
|
1698
|
-
"description": "Error message for failed validation."
|
|
1699
|
-
}
|
|
1700
|
-
},
|
|
1701
|
-
"required": [
|
|
1702
|
-
"name",
|
|
1703
|
-
"rule"
|
|
1704
|
-
],
|
|
1705
|
-
"additionalProperties": false
|
|
1706
|
-
},
|
|
1707
|
-
"description": "Custom validation rules."
|
|
1708
|
-
}
|
|
1709
|
-
},
|
|
1710
|
-
"additionalProperties": false
|
|
1711
|
-
}
|
|
1712
|
-
},
|
|
1713
|
-
"required": [
|
|
1714
|
-
"jsonSchema"
|
|
1715
|
-
],
|
|
1716
|
-
"additionalProperties": false
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
},
|
|
1720
|
-
{
|
|
1721
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1722
|
-
"$id": "https://unispec.dev/schema/types/service.schema.json",
|
|
1723
|
-
"title": "UniSpec Service",
|
|
1724
|
-
"type": "object",
|
|
1725
|
-
"required": [
|
|
1726
|
-
"name"
|
|
1727
|
-
],
|
|
1728
|
-
"properties": {
|
|
1729
|
-
"name": {
|
|
1730
|
-
"$ref": "./common.schema.json#/$defs/Identifier"
|
|
1731
|
-
},
|
|
1732
|
-
"description": {
|
|
1733
|
-
"$ref": "./common.schema.json#/$defs/Description"
|
|
1734
|
-
},
|
|
1735
|
-
"version": {
|
|
1736
|
-
"$ref": "./common.schema.json#/$defs/Version"
|
|
1737
|
-
},
|
|
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
|
-
"contact": {
|
|
1750
|
-
"type": "object",
|
|
1751
|
-
"description": "Contact information for the service.",
|
|
1752
|
-
"properties": {
|
|
1753
|
-
"name": {
|
|
1754
|
-
"type": "string",
|
|
1755
|
-
"description": "Contact name."
|
|
1756
|
-
},
|
|
1757
|
-
"email": {
|
|
1758
|
-
"$ref": "./common.schema.json#/$defs/Email"
|
|
1759
|
-
},
|
|
1760
|
-
"url": {
|
|
1761
|
-
"$ref": "./common.schema.json#/$defs/Url"
|
|
1762
|
-
}
|
|
1763
|
-
},
|
|
1764
|
-
"additionalProperties": false
|
|
1765
|
-
},
|
|
1766
|
-
"license": {
|
|
1767
|
-
"type": "object",
|
|
1768
|
-
"description": "License information for the service.",
|
|
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
|
-
}
|
|
1796
|
-
},
|
|
1797
|
-
"protocols": {
|
|
1798
|
-
"type": "object",
|
|
1799
|
-
"description": "Protocol-specific API surfaces exposed by this service.",
|
|
1800
|
-
"properties": {
|
|
1801
|
-
"rest": {
|
|
1802
|
-
"$ref": "./rest.schema.json#"
|
|
1803
|
-
},
|
|
1804
|
-
"graphql": {
|
|
1805
|
-
"$ref": "./graphql.schema.json#"
|
|
1806
|
-
},
|
|
1807
|
-
"websocket": {
|
|
1808
|
-
"$ref": "./websocket.schema.json#"
|
|
1809
|
-
}
|
|
1810
|
-
},
|
|
1811
|
-
"additionalProperties": false
|
|
1812
|
-
},
|
|
1813
|
-
"schemas": {
|
|
1814
|
-
"$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
|
-
}
|
|
1889
|
-
},
|
|
1890
|
-
"additionalProperties": false
|
|
1891
|
-
},
|
|
1892
|
-
{
|
|
1893
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1894
|
-
"$id": "https://unispec.dev/schema/types/websocket.schema.json",
|
|
1895
|
-
"title": "WebSocket API surface",
|
|
1896
|
-
"type": "object",
|
|
1897
|
-
"$defs": {
|
|
1898
|
-
"Message": {
|
|
1899
|
-
"type": "object",
|
|
1900
|
-
"required": [
|
|
1901
|
-
"name"
|
|
1902
|
-
],
|
|
1903
|
-
"properties": {
|
|
1904
|
-
"name": {
|
|
1905
|
-
"$ref": "./common.schema.json#/$defs/Identifier"
|
|
1906
|
-
},
|
|
1907
|
-
"description": {
|
|
1908
|
-
"$ref": "./common.schema.json#/$defs/Description"
|
|
1909
|
-
},
|
|
1910
|
-
"direction": {
|
|
1911
|
-
"type": "string",
|
|
1912
|
-
"description": "Direction of message flow.",
|
|
1913
|
-
"enum": [
|
|
1914
|
-
"publish",
|
|
1915
|
-
"subscribe",
|
|
1916
|
-
"both"
|
|
1917
|
-
],
|
|
1918
|
-
"default": "both"
|
|
1919
|
-
},
|
|
1920
|
-
"deprecated": {
|
|
1921
|
-
"type": "boolean",
|
|
1922
|
-
"description": "Marks the message as deprecated.",
|
|
1923
|
-
"default": false
|
|
1924
|
-
},
|
|
1925
|
-
"deprecationReason": {
|
|
1926
|
-
"type": "string",
|
|
1927
|
-
"description": "Human-readable reason for deprecation."
|
|
1928
|
-
},
|
|
1929
|
-
"schemaRef": {
|
|
1930
|
-
"type": "string",
|
|
1931
|
-
"description": "Reference to a reusable schema describing the message payload. Recommended format: <SchemaName> (where SchemaName is a key in service.schemas). Tools may also accept a JSON Pointer in the form #/service/schemas/<SchemaName>."
|
|
1932
|
-
}
|
|
1933
|
-
},
|
|
1934
|
-
"additionalProperties": false
|
|
1935
|
-
},
|
|
1936
|
-
"Header": {
|
|
1937
|
-
"type": "object",
|
|
1938
|
-
"required": [
|
|
1939
|
-
"name"
|
|
1940
|
-
],
|
|
1941
|
-
"properties": {
|
|
1942
|
-
"name": {
|
|
1943
|
-
"type": "string",
|
|
1944
|
-
"description": "Header name (case-insensitive)."
|
|
1945
|
-
},
|
|
1946
|
-
"description": {
|
|
1947
|
-
"type": "string",
|
|
1948
|
-
"description": "Human-readable description of the header."
|
|
1949
|
-
},
|
|
1950
|
-
"required": {
|
|
1951
|
-
"type": "boolean",
|
|
1952
|
-
"description": "Whether this header is required.",
|
|
1953
|
-
"default": false
|
|
1954
|
-
},
|
|
1955
|
-
"defaultValue": {
|
|
1956
|
-
"type": "string",
|
|
1957
|
-
"description": "Default value for the header."
|
|
1958
|
-
}
|
|
1959
|
-
},
|
|
1960
|
-
"additionalProperties": false
|
|
1961
|
-
},
|
|
1962
|
-
"SecurityRequirement": {
|
|
1963
|
-
"type": "array",
|
|
1964
|
-
"description": "Alternative set of named security schemes applied to a WebSocket channel.",
|
|
1965
|
-
"items": {
|
|
1966
|
-
"$ref": "./common.schema.json#/$defs/Identifier"
|
|
1967
|
-
}
|
|
1968
|
-
},
|
|
1969
|
-
"Channel": {
|
|
1970
|
-
"type": "object",
|
|
1971
|
-
"required": [
|
|
1972
|
-
"name"
|
|
1973
|
-
],
|
|
1974
|
-
"properties": {
|
|
1975
|
-
"name": {
|
|
1976
|
-
"$ref": "./common.schema.json#/$defs/Identifier"
|
|
1977
|
-
},
|
|
1978
|
-
"description": {
|
|
1979
|
-
"$ref": "./common.schema.json#/$defs/Description"
|
|
1980
|
-
},
|
|
1981
|
-
"tags": {
|
|
1982
|
-
"type": "array",
|
|
1983
|
-
"description": "Tags for grouping channels.",
|
|
1984
|
-
"items": {
|
|
1985
|
-
"$ref": "./common.schema.json#/$defs/Tag"
|
|
1986
|
-
}
|
|
1987
|
-
},
|
|
1988
|
-
"namespace": {
|
|
1989
|
-
"type": "string",
|
|
1990
|
-
"description": "Optional namespace for the channel (e.g. 'chat', 'notifications'). Used to group related channels and avoid name collisions."
|
|
1991
|
-
},
|
|
1992
|
-
"direction": {
|
|
1993
|
-
"type": "string",
|
|
1994
|
-
"description": "Direction of message flow on this channel.",
|
|
1995
|
-
"enum": [
|
|
1996
|
-
"publish",
|
|
1997
|
-
"subscribe",
|
|
1998
|
-
"both"
|
|
1999
|
-
],
|
|
2000
|
-
"default": "both"
|
|
2001
|
-
},
|
|
2002
|
-
"connectionParams": {
|
|
2003
|
-
"type": "object",
|
|
2004
|
-
"description": "Parameters required for establishing connection to this channel.",
|
|
2005
|
-
"additionalProperties": {
|
|
2006
|
-
"type": "string",
|
|
2007
|
-
"description": "Connection parameter value."
|
|
2008
|
-
}
|
|
2009
|
-
},
|
|
2010
|
-
"reconnectStrategy": {
|
|
2011
|
-
"type": "object",
|
|
2012
|
-
"description": "Reconnection strategy for this channel.",
|
|
2013
|
-
"properties": {
|
|
2014
|
-
"maxAttempts": {
|
|
2015
|
-
"type": "integer",
|
|
2016
|
-
"description": "Maximum number of reconnection attempts.",
|
|
2017
|
-
"minimum": 0,
|
|
2018
|
-
"default": 5
|
|
2019
|
-
},
|
|
2020
|
-
"delay": {
|
|
2021
|
-
"type": "integer",
|
|
2022
|
-
"description": "Initial delay between reconnection attempts in milliseconds.",
|
|
2023
|
-
"minimum": 0,
|
|
2024
|
-
"default": 1000
|
|
2025
|
-
},
|
|
2026
|
-
"backoffMultiplier": {
|
|
2027
|
-
"type": "number",
|
|
2028
|
-
"description": "Multiplier for exponential backoff.",
|
|
2029
|
-
"minimum": 1,
|
|
2030
|
-
"default": 2
|
|
2031
|
-
}
|
|
2032
|
-
},
|
|
2033
|
-
"additionalProperties": false
|
|
2034
|
-
},
|
|
2035
|
-
"headers": {
|
|
2036
|
-
"type": "array",
|
|
2037
|
-
"description": "HTTP headers commonly used for WebSocket connections on this channel.",
|
|
2038
|
-
"items": {
|
|
2039
|
-
"$ref": "#/$defs/Header"
|
|
2040
|
-
}
|
|
2041
|
-
},
|
|
2042
|
-
"messages": {
|
|
2043
|
-
"type": "array",
|
|
2044
|
-
"description": "Messages that may be sent or received on this channel.",
|
|
2045
|
-
"items": {
|
|
2046
|
-
"$ref": "#/$defs/Message"
|
|
2047
|
-
}
|
|
2048
|
-
},
|
|
2049
|
-
"security": {
|
|
2050
|
-
"type": "array",
|
|
2051
|
-
"description": "Security requirements for this channel. Each item represents an alternative set of named security schemes.",
|
|
2052
|
-
"items": {
|
|
2053
|
-
"$ref": "#/$defs/SecurityRequirement"
|
|
2054
|
-
}
|
|
2055
|
-
}
|
|
2056
|
-
},
|
|
2057
|
-
"additionalProperties": false
|
|
2058
|
-
}
|
|
2059
|
-
},
|
|
2060
|
-
"properties": {
|
|
2061
|
-
"headers": {
|
|
2062
|
-
"type": "array",
|
|
2063
|
-
"description": "HTTP headers commonly used for WebSocket connections.",
|
|
2064
|
-
"items": {
|
|
2065
|
-
"$ref": "#/$defs/Header"
|
|
2066
|
-
}
|
|
2067
|
-
},
|
|
2068
|
-
"url": {
|
|
2069
|
-
"type": "string",
|
|
2070
|
-
"description": "Optional path or URL of the WebSocket endpoint. Recommended: relative path (e.g. '/ws' or '/socket.io' for Socket.IO). Absolute URLs are allowed only if the service is tightly bound to a single host. If omitted, tooling may assume a framework default (commonly '/ws' for WebSocket servers or '/socket.io' for Socket.IO)."
|
|
2071
|
-
},
|
|
2072
|
-
"channels": {
|
|
2073
|
-
"type": "array",
|
|
2074
|
-
"description": "WebSocket channels/topics exposed by the service.",
|
|
2075
|
-
"items": {
|
|
2076
|
-
"$ref": "#/$defs/Channel"
|
|
2077
|
-
}
|
|
2078
|
-
},
|
|
2079
|
-
"securitySchemes": {
|
|
2080
|
-
"type": "object",
|
|
2081
|
-
"description": "Authentication mechanisms available for this WebSocket surface.",
|
|
2082
|
-
"additionalProperties": {
|
|
2083
|
-
"type": "object",
|
|
2084
|
-
"description": "Security scheme definition (shape is intentionally flexible and may evolve).",
|
|
2085
|
-
"additionalProperties": true
|
|
2086
|
-
}
|
|
2087
|
-
}
|
|
2088
|
-
},
|
|
2089
|
-
"additionalProperties": false
|
|
2090
|
-
}
|
|
2091
|
-
]
|
|
2092
|
-
};
|
|
2093
|
-
exports.SCHEMA_IDS = [
|
|
2094
|
-
"https://unispec.dev/schema/types/common.schema.json",
|
|
2095
|
-
"https://unispec.dev/schema/types/graphql.schema.json",
|
|
2096
|
-
"https://unispec.dev/schema/types/rest.schema.json",
|
|
2097
|
-
"https://unispec.dev/schema/types/schemas.schema.json",
|
|
2098
|
-
"https://unispec.dev/schema/types/service.schema.json",
|
|
2099
|
-
"https://unispec.dev/schema/types/websocket.schema.json"
|
|
2100
|
-
];
|