@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.
Files changed (98) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +11 -2
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.js +8 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/oas/functions/index.d.ts +15 -0
  7. package/dist/oas/functions/index.js +33 -0
  8. package/dist/oas/functions/index.js.map +1 -0
  9. package/dist/oas/functions/oasDiscriminator.d.ts +6 -0
  10. package/dist/oas/functions/oasDiscriminator.js +39 -0
  11. package/dist/oas/functions/oasDiscriminator.js.map +1 -0
  12. package/dist/oas/functions/oasDocumentSchema.d.ts +2 -0
  13. package/dist/oas/functions/oasDocumentSchema.js +104 -0
  14. package/dist/oas/functions/oasDocumentSchema.js.map +1 -0
  15. package/dist/oas/functions/oasExample.d.ts +7 -0
  16. package/dist/oas/functions/oasExample.js +217 -0
  17. package/dist/oas/functions/oasExample.js.map +1 -0
  18. package/dist/oas/functions/oasOpFormDataConsumeCheck.d.ts +6 -0
  19. package/dist/oas/functions/oasOpFormDataConsumeCheck.js +30 -0
  20. package/dist/oas/functions/oasOpFormDataConsumeCheck.js.map +1 -0
  21. package/dist/oas/functions/oasOpIdUnique.d.ts +2 -0
  22. package/dist/oas/functions/oasOpIdUnique.js +35 -0
  23. package/dist/oas/functions/oasOpIdUnique.js.map +1 -0
  24. package/dist/oas/functions/oasOpParams.d.ts +2 -0
  25. package/dist/oas/functions/oasOpParams.js +75 -0
  26. package/dist/oas/functions/oasOpParams.js.map +1 -0
  27. package/dist/oas/functions/oasOpSuccessResponse.d.ts +2 -0
  28. package/dist/oas/functions/oasOpSuccessResponse.js +27 -0
  29. package/dist/oas/functions/oasOpSuccessResponse.js.map +1 -0
  30. package/dist/oas/functions/oasPathParam.d.ts +2 -0
  31. package/dist/oas/functions/oasPathParam.js +135 -0
  32. package/dist/oas/functions/oasPathParam.js.map +1 -0
  33. package/dist/oas/functions/oasSchema.d.ts +5 -0
  34. package/dist/oas/functions/oasSchema.js +81 -0
  35. package/dist/oas/functions/oasSchema.js.map +1 -0
  36. package/dist/oas/functions/oasSecurityDefined.d.ts +5 -0
  37. package/dist/oas/functions/oasSecurityDefined.js +76 -0
  38. package/dist/oas/functions/oasSecurityDefined.js.map +1 -0
  39. package/dist/oas/functions/oasTagDefined.d.ts +2 -0
  40. package/dist/oas/functions/oasTagDefined.js +42 -0
  41. package/dist/oas/functions/oasTagDefined.js.map +1 -0
  42. package/dist/oas/functions/oasUnusedComponent.d.ts +4 -0
  43. package/dist/oas/functions/oasUnusedComponent.js +40 -0
  44. package/dist/oas/functions/oasUnusedComponent.js.map +1 -0
  45. package/dist/oas/functions/refSiblings.d.ts +2 -0
  46. package/dist/oas/functions/refSiblings.js +42 -0
  47. package/dist/oas/functions/refSiblings.js.map +1 -0
  48. package/dist/oas/functions/typedEnum.d.ts +7 -0
  49. package/dist/oas/functions/typedEnum.js +76 -0
  50. package/dist/oas/functions/typedEnum.js.map +1 -0
  51. package/dist/oas/functions/utils/getAllOperations.d.ts +7 -0
  52. package/dist/oas/functions/utils/getAllOperations.js +31 -0
  53. package/dist/oas/functions/utils/getAllOperations.js.map +1 -0
  54. package/dist/oas/functions/utils/isObject.d.ts +2 -0
  55. package/dist/oas/functions/utils/isObject.js +7 -0
  56. package/dist/oas/functions/utils/isObject.js.map +1 -0
  57. package/dist/oas/index.d.ts +733 -0
  58. package/dist/oas/index.js +765 -0
  59. package/dist/oas/index.js.map +1 -0
  60. package/dist/oas/schemas/__fixtures__/validate.d.ts +1 -0
  61. package/dist/oas/schemas/__fixtures__/validate.js +3 -0
  62. package/dist/oas/schemas/__fixtures__/validate.js.map +1 -0
  63. package/dist/oas/schemas/json-schema/draft-04.json +137 -0
  64. package/dist/oas/schemas/json-schema/draft-2020-12/index.json +54 -0
  65. package/dist/oas/schemas/json-schema/draft-2020-12/validation.json +101 -0
  66. package/dist/oas/schemas/oas/v2.0.json +1478 -0
  67. package/dist/oas/schemas/oas/v3.0.json +1652 -0
  68. package/dist/oas/schemas/oas/v3.1/dialect.schema.json +35 -0
  69. package/dist/oas/schemas/oas/v3.1/index.json +1276 -0
  70. package/dist/oas/schemas/oas/v3.1/meta.schema.json +93 -0
  71. package/dist/oas/schemas/oas/v3.2/dialect.schema.json +25 -0
  72. package/dist/oas/schemas/oas/v3.2/index.json +1527 -0
  73. package/dist/oas/schemas/oas/v3.2/meta.schema.json +103 -0
  74. package/dist/oas/schemas/validators.d.ts +66 -0
  75. package/dist/oas/schemas/validators.js +12991 -0
  76. package/dist/oas/schemas/validators.js.map +1 -0
  77. package/dist/shared/functions/index.d.ts +2 -0
  78. package/dist/shared/functions/index.js +7 -0
  79. package/dist/shared/functions/index.js.map +1 -0
  80. package/dist/shared/functions/serverVariables/index.d.ts +16 -0
  81. package/dist/shared/functions/serverVariables/index.js +154 -0
  82. package/dist/shared/functions/serverVariables/index.js.map +1 -0
  83. package/dist/shared/functions/serverVariables/utils/applyUrlVariables.d.ts +3 -0
  84. package/dist/shared/functions/serverVariables/utils/applyUrlVariables.js +32 -0
  85. package/dist/shared/functions/serverVariables/utils/applyUrlVariables.js.map +1 -0
  86. package/dist/shared/functions/serverVariables/utils/parseUrlVariables.d.ts +1 -0
  87. package/dist/shared/functions/serverVariables/utils/parseUrlVariables.js +12 -0
  88. package/dist/shared/functions/serverVariables/utils/parseUrlVariables.js.map +1 -0
  89. package/dist/shared/functions/uniquenessTags.d.ts +5 -0
  90. package/dist/shared/functions/uniquenessTags.js +42 -0
  91. package/dist/shared/functions/uniquenessTags.js.map +1 -0
  92. package/dist/shared/utils/getMissingProps.d.ts +1 -0
  93. package/dist/shared/utils/getMissingProps.js +9 -0
  94. package/dist/shared/utils/getMissingProps.js.map +1 -0
  95. package/dist/shared/utils/getRedundantProps.d.ts +1 -0
  96. package/dist/shared/utils/getRedundantProps.js +9 -0
  97. package/dist/shared/utils/getRedundantProps.js.map +1 -0
  98. 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
+ }