@openlint/ruleset-spectral-oas 0.0.0-stage → 1.0.0
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/LICENSE +191 -0
- package/README.md +11 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/oas/functions/index.d.ts +15 -0
- package/dist/oas/functions/index.js +33 -0
- package/dist/oas/functions/index.js.map +1 -0
- package/dist/oas/functions/oasDiscriminator.d.ts +6 -0
- package/dist/oas/functions/oasDiscriminator.js +39 -0
- package/dist/oas/functions/oasDiscriminator.js.map +1 -0
- package/dist/oas/functions/oasDocumentSchema.d.ts +2 -0
- package/dist/oas/functions/oasDocumentSchema.js +104 -0
- package/dist/oas/functions/oasDocumentSchema.js.map +1 -0
- package/dist/oas/functions/oasExample.d.ts +7 -0
- package/dist/oas/functions/oasExample.js +217 -0
- package/dist/oas/functions/oasExample.js.map +1 -0
- package/dist/oas/functions/oasOpFormDataConsumeCheck.d.ts +6 -0
- package/dist/oas/functions/oasOpFormDataConsumeCheck.js +30 -0
- package/dist/oas/functions/oasOpFormDataConsumeCheck.js.map +1 -0
- package/dist/oas/functions/oasOpIdUnique.d.ts +2 -0
- package/dist/oas/functions/oasOpIdUnique.js +35 -0
- package/dist/oas/functions/oasOpIdUnique.js.map +1 -0
- package/dist/oas/functions/oasOpParams.d.ts +2 -0
- package/dist/oas/functions/oasOpParams.js +75 -0
- package/dist/oas/functions/oasOpParams.js.map +1 -0
- package/dist/oas/functions/oasOpSuccessResponse.d.ts +2 -0
- package/dist/oas/functions/oasOpSuccessResponse.js +27 -0
- package/dist/oas/functions/oasOpSuccessResponse.js.map +1 -0
- package/dist/oas/functions/oasPathParam.d.ts +2 -0
- package/dist/oas/functions/oasPathParam.js +135 -0
- package/dist/oas/functions/oasPathParam.js.map +1 -0
- package/dist/oas/functions/oasSchema.d.ts +5 -0
- package/dist/oas/functions/oasSchema.js +81 -0
- package/dist/oas/functions/oasSchema.js.map +1 -0
- package/dist/oas/functions/oasSecurityDefined.d.ts +5 -0
- package/dist/oas/functions/oasSecurityDefined.js +76 -0
- package/dist/oas/functions/oasSecurityDefined.js.map +1 -0
- package/dist/oas/functions/oasTagDefined.d.ts +2 -0
- package/dist/oas/functions/oasTagDefined.js +42 -0
- package/dist/oas/functions/oasTagDefined.js.map +1 -0
- package/dist/oas/functions/oasUnusedComponent.d.ts +4 -0
- package/dist/oas/functions/oasUnusedComponent.js +40 -0
- package/dist/oas/functions/oasUnusedComponent.js.map +1 -0
- package/dist/oas/functions/refSiblings.d.ts +2 -0
- package/dist/oas/functions/refSiblings.js +42 -0
- package/dist/oas/functions/refSiblings.js.map +1 -0
- package/dist/oas/functions/typedEnum.d.ts +7 -0
- package/dist/oas/functions/typedEnum.js +76 -0
- package/dist/oas/functions/typedEnum.js.map +1 -0
- package/dist/oas/functions/utils/getAllOperations.d.ts +7 -0
- package/dist/oas/functions/utils/getAllOperations.js +31 -0
- package/dist/oas/functions/utils/getAllOperations.js.map +1 -0
- package/dist/oas/functions/utils/isObject.d.ts +2 -0
- package/dist/oas/functions/utils/isObject.js +7 -0
- package/dist/oas/functions/utils/isObject.js.map +1 -0
- package/dist/oas/index.d.ts +733 -0
- package/dist/oas/index.js +765 -0
- package/dist/oas/index.js.map +1 -0
- package/dist/oas/schemas/__fixtures__/validate.d.ts +1 -0
- package/dist/oas/schemas/__fixtures__/validate.js +3 -0
- package/dist/oas/schemas/__fixtures__/validate.js.map +1 -0
- package/dist/oas/schemas/json-schema/draft-04.json +137 -0
- package/dist/oas/schemas/json-schema/draft-2020-12/index.json +54 -0
- package/dist/oas/schemas/json-schema/draft-2020-12/validation.json +101 -0
- package/dist/oas/schemas/oas/v2.0.json +1478 -0
- package/dist/oas/schemas/oas/v3.0.json +1652 -0
- package/dist/oas/schemas/oas/v3.1/dialect.schema.json +35 -0
- package/dist/oas/schemas/oas/v3.1/index.json +1276 -0
- package/dist/oas/schemas/oas/v3.1/meta.schema.json +93 -0
- package/dist/oas/schemas/oas/v3.2/dialect.schema.json +25 -0
- package/dist/oas/schemas/oas/v3.2/index.json +1527 -0
- package/dist/oas/schemas/oas/v3.2/meta.schema.json +103 -0
- package/dist/oas/schemas/validators.d.ts +66 -0
- package/dist/oas/schemas/validators.js +12991 -0
- package/dist/oas/schemas/validators.js.map +1 -0
- package/dist/shared/functions/index.d.ts +2 -0
- package/dist/shared/functions/index.js +7 -0
- package/dist/shared/functions/index.js.map +1 -0
- package/dist/shared/functions/serverVariables/index.d.ts +16 -0
- package/dist/shared/functions/serverVariables/index.js +154 -0
- package/dist/shared/functions/serverVariables/index.js.map +1 -0
- package/dist/shared/functions/serverVariables/utils/applyUrlVariables.d.ts +3 -0
- package/dist/shared/functions/serverVariables/utils/applyUrlVariables.js +32 -0
- package/dist/shared/functions/serverVariables/utils/applyUrlVariables.js.map +1 -0
- package/dist/shared/functions/serverVariables/utils/parseUrlVariables.d.ts +1 -0
- package/dist/shared/functions/serverVariables/utils/parseUrlVariables.js +12 -0
- package/dist/shared/functions/serverVariables/utils/parseUrlVariables.js.map +1 -0
- package/dist/shared/functions/uniquenessTags.d.ts +5 -0
- package/dist/shared/functions/uniquenessTags.js +42 -0
- package/dist/shared/functions/uniquenessTags.js.map +1 -0
- package/dist/shared/utils/getMissingProps.d.ts +1 -0
- package/dist/shared/utils/getMissingProps.js +9 -0
- package/dist/shared/utils/getMissingProps.js.map +1 -0
- package/dist/shared/utils/getRedundantProps.d.ts +1 -0
- package/dist/shared/utils/getRedundantProps.js +9 -0
- package/dist/shared/utils/getRedundantProps.js.map +1 -0
- package/package.json +47 -4
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://spec.openapis.org/oas/3.1/meta/base",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "OAS Base vocabulary",
|
|
5
|
+
"description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect",
|
|
6
|
+
"$vocabulary": {
|
|
7
|
+
"https://spec.openapis.org/oas/3.1/vocab/base": true
|
|
8
|
+
},
|
|
9
|
+
"if": {
|
|
10
|
+
"type": "object"
|
|
11
|
+
},
|
|
12
|
+
"then": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"example": true,
|
|
16
|
+
"discriminator": { "$ref": "#/$defs/discriminator" },
|
|
17
|
+
"externalDocs": { "$ref": "#/$defs/external-docs" },
|
|
18
|
+
"xml": { "$ref": "#/$defs/xml" }
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"else": {
|
|
22
|
+
"if": {
|
|
23
|
+
"type": "boolean"
|
|
24
|
+
},
|
|
25
|
+
"then": true,
|
|
26
|
+
"else": {
|
|
27
|
+
"not": true,
|
|
28
|
+
"errorMessage": "\"{{property}}\" property must be a valid Schema Object"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"$defs": {
|
|
32
|
+
"extensible": {
|
|
33
|
+
"patternProperties": {
|
|
34
|
+
"^x-": true
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"discriminator": {
|
|
38
|
+
"$ref": "#/$defs/extensible",
|
|
39
|
+
"type": "object",
|
|
40
|
+
"properties": {
|
|
41
|
+
"propertyName": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"mapping": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": ["propertyName"],
|
|
52
|
+
"unevaluatedProperties": false
|
|
53
|
+
},
|
|
54
|
+
"external-docs": {
|
|
55
|
+
"$ref": "#/$defs/extensible",
|
|
56
|
+
"type": "object",
|
|
57
|
+
"properties": {
|
|
58
|
+
"url": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"format": "uri-reference"
|
|
61
|
+
},
|
|
62
|
+
"description": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"required": ["url"],
|
|
67
|
+
"unevaluatedProperties": false
|
|
68
|
+
},
|
|
69
|
+
"xml": {
|
|
70
|
+
"$ref": "#/$defs/extensible",
|
|
71
|
+
"type": "object",
|
|
72
|
+
"properties": {
|
|
73
|
+
"name": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"namespace": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"format": "uri"
|
|
79
|
+
},
|
|
80
|
+
"prefix": {
|
|
81
|
+
"type": "string"
|
|
82
|
+
},
|
|
83
|
+
"attribute": {
|
|
84
|
+
"type": "boolean"
|
|
85
|
+
},
|
|
86
|
+
"wrapped": {
|
|
87
|
+
"type": "boolean"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"unevaluatedProperties": false
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://spec.openapis.org/oas/3.2/dialect/2025-09-17",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "OpenAPI 3.2 Schema Object Dialect",
|
|
5
|
+
"description": "A JSON Schema dialect describing schemas found in OpenAPI v3.2.x Descriptions",
|
|
6
|
+
"$dynamicAnchor": "meta",
|
|
7
|
+
"$vocabulary": {
|
|
8
|
+
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
9
|
+
"https://json-schema.org/draft/2020-12/vocab/content": true,
|
|
10
|
+
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
11
|
+
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
|
|
12
|
+
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
|
|
13
|
+
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
|
|
14
|
+
"https://json-schema.org/draft/2020-12/vocab/validation": true,
|
|
15
|
+
"https://spec.openapis.org/oas/3.2/vocab/base": false
|
|
16
|
+
},
|
|
17
|
+
"allOf": [
|
|
18
|
+
{
|
|
19
|
+
"$ref": "https://json-schema.org/draft/2020-12/schema"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"$ref": "https://spec.openapis.org/oas/3.2/meta/2025-09-17"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|