@redocly/openapi-core 0.0.0-snapshot.1740152436 → 0.0.0-snapshot.1740488474
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/lib/config/all.js +1 -1
- package/lib/config/minimal.js +1 -1
- package/lib/config/recommended-strict.js +1 -1
- package/lib/config/recommended.js +1 -1
- package/lib/config/spec.js +1 -1
- package/lib/rules/arazzo/index.js +3 -3
- package/lib/rules/arazzo/requestBody-replacements-unique.js +21 -16
- package/lib/rules/{spot → respect}/no-criteria-xpath.js +1 -1
- package/lib/rules/respect/respect-supported-versions.d.ts +2 -0
- package/lib/rules/{spot/spot-supported-versions.js → respect/respect-supported-versions.js} +6 -6
- package/lib/types/redocly-yaml.d.ts +1 -1
- package/lib/types/redocly-yaml.js +1 -1
- package/lib/typings/arazzo.d.ts +1 -1
- package/lib/typings/arazzo.js +2 -2
- package/package.json +2 -1
- package/lib/rules/spot/spot-supported-versions.d.ts +0 -2
- /package/lib/rules/{spot → respect}/no-criteria-xpath.d.ts +0 -0
package/lib/config/all.js
CHANGED
|
@@ -222,7 +222,7 @@ const all = {
|
|
|
222
222
|
'stepId-unique': 'error',
|
|
223
223
|
'sourceDescription-name-unique': 'error',
|
|
224
224
|
'sourceDescriptions-not-empty': 'error',
|
|
225
|
-
'
|
|
225
|
+
'respect-supported-versions': 'off',
|
|
226
226
|
'workflowId-unique': 'error',
|
|
227
227
|
'workflow-dependsOn': 'error',
|
|
228
228
|
},
|
package/lib/config/minimal.js
CHANGED
|
@@ -198,7 +198,7 @@ const minimal = {
|
|
|
198
198
|
'step-onFailure-unique': 'off',
|
|
199
199
|
'stepId-unique': 'error',
|
|
200
200
|
'sourceDescription-name-unique': 'off',
|
|
201
|
-
'
|
|
201
|
+
'respect-supported-versions': 'off',
|
|
202
202
|
'workflowId-unique': 'error',
|
|
203
203
|
'workflow-dependsOn': 'off',
|
|
204
204
|
},
|
|
@@ -198,7 +198,7 @@ const recommendedStrict = {
|
|
|
198
198
|
'stepId-unique': 'error',
|
|
199
199
|
'sourceDescription-name-unique': 'error',
|
|
200
200
|
'sourceDescriptions-not-empty': 'error',
|
|
201
|
-
'
|
|
201
|
+
'respect-supported-versions': 'off',
|
|
202
202
|
'workflowId-unique': 'error',
|
|
203
203
|
'workflow-dependsOn': 'error',
|
|
204
204
|
},
|
|
@@ -198,7 +198,7 @@ const recommended = {
|
|
|
198
198
|
'stepId-unique': 'error',
|
|
199
199
|
'sourceDescription-name-unique': 'error',
|
|
200
200
|
'sourceDescriptions-not-empty': 'error',
|
|
201
|
-
'
|
|
201
|
+
'respect-supported-versions': 'off',
|
|
202
202
|
'workflowId-unique': 'error',
|
|
203
203
|
'workflow-dependsOn': 'error',
|
|
204
204
|
},
|
package/lib/config/spec.js
CHANGED
|
@@ -12,7 +12,7 @@ const spec = {
|
|
|
12
12
|
async3Rules: {},
|
|
13
13
|
arazzo1Rules: {
|
|
14
14
|
'sourceDescription-type': 'error',
|
|
15
|
-
'
|
|
15
|
+
'respect-supported-versions': 'off',
|
|
16
16
|
'workflowId-unique': 'error',
|
|
17
17
|
'stepId-unique': 'error',
|
|
18
18
|
'sourceDescription-name-unique': 'error',
|
|
@@ -5,7 +5,7 @@ const struct_1 = require("../common/struct");
|
|
|
5
5
|
const assertions_1 = require("../common/assertions");
|
|
6
6
|
const sourceDescription_type_1 = require("../arazzo/sourceDescription-type");
|
|
7
7
|
const sourceDescriptions_not_empty_1 = require("./sourceDescriptions-not-empty");
|
|
8
|
-
const
|
|
8
|
+
const respect_supported_versions_1 = require("../respect/respect-supported-versions");
|
|
9
9
|
const workflowId_unique_1 = require("./workflowId-unique");
|
|
10
10
|
const stepId_unique_1 = require("./stepId-unique");
|
|
11
11
|
const sourceDescriptions_name_unique_1 = require("./sourceDescriptions-name-unique");
|
|
@@ -14,13 +14,13 @@ const parameters_unique_1 = require("./parameters-unique");
|
|
|
14
14
|
const step_onSuccess_unique_1 = require("./step-onSuccess-unique");
|
|
15
15
|
const step_onFailure_unique_1 = require("./step-onFailure-unique");
|
|
16
16
|
const requestBody_replacements_unique_1 = require("./requestBody-replacements-unique");
|
|
17
|
-
const no_criteria_xpath_1 = require("../
|
|
17
|
+
const no_criteria_xpath_1 = require("../respect/no-criteria-xpath");
|
|
18
18
|
const criteria_unique_1 = require("./criteria-unique");
|
|
19
19
|
exports.rules = {
|
|
20
20
|
struct: struct_1.Struct,
|
|
21
21
|
assertions: assertions_1.Assertions,
|
|
22
22
|
'sourceDescription-type': sourceDescription_type_1.SourceDescriptionType,
|
|
23
|
-
'
|
|
23
|
+
'respect-supported-versions': respect_supported_versions_1.RespectSupportedVersions,
|
|
24
24
|
'workflowId-unique': workflowId_unique_1.WorkflowIdUnique,
|
|
25
25
|
'stepId-unique': stepId_unique_1.StepIdUnique,
|
|
26
26
|
'sourceDescription-name-unique': sourceDescriptions_name_unique_1.SourceDescriptionsNameUnique,
|
|
@@ -4,23 +4,28 @@ exports.RequestBodyReplacementsUnique = void 0;
|
|
|
4
4
|
const RequestBodyReplacementsUnique = () => {
|
|
5
5
|
const seenReplacements = new Set();
|
|
6
6
|
return {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
`
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
Step: {
|
|
8
|
+
leave() {
|
|
9
|
+
seenReplacements.clear();
|
|
10
|
+
},
|
|
11
|
+
RequestBody: {
|
|
12
|
+
enter(requestBody, { report, location }) {
|
|
13
|
+
if (!requestBody.replacements)
|
|
14
|
+
return;
|
|
15
|
+
for (const replacement of requestBody.replacements) {
|
|
16
|
+
if (seenReplacements.has(replacement.target)) {
|
|
17
|
+
report({
|
|
18
|
+
message: 'Every `replacement` in `requestBody` must be unique.',
|
|
19
|
+
location: location.child([
|
|
20
|
+
'replacements',
|
|
21
|
+
requestBody.replacements.indexOf(replacement),
|
|
22
|
+
`target`,
|
|
23
|
+
]),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
seenReplacements.add(replacement.target);
|
|
21
27
|
}
|
|
22
|
-
|
|
23
|
-
}
|
|
28
|
+
},
|
|
24
29
|
},
|
|
25
30
|
},
|
|
26
31
|
};
|
|
@@ -10,7 +10,7 @@ const NoCriteriaXpath = () => {
|
|
|
10
10
|
}
|
|
11
11
|
if (criteria?.type?.type === 'xpath' || criteria?.type === 'xpath') {
|
|
12
12
|
report({
|
|
13
|
-
message: 'The `xpath` type criteria is not supported by
|
|
13
|
+
message: 'The `xpath` type criteria is not supported by Respect.',
|
|
14
14
|
location: location.child(['type']),
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RespectSupportedVersions = void 0;
|
|
4
4
|
const arazzo_1 = require("../../typings/arazzo");
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
|
-
const
|
|
7
|
-
const supportedVersions = arazzo_1.
|
|
6
|
+
const RespectSupportedVersions = () => {
|
|
7
|
+
const supportedVersions = arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.join(', ');
|
|
8
8
|
return {
|
|
9
9
|
Root: {
|
|
10
10
|
enter(root, { report, location }) {
|
|
11
|
-
if (!arazzo_1.
|
|
11
|
+
if (!arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.includes(root.arazzo)) {
|
|
12
12
|
report({
|
|
13
|
-
message: `Only ${supportedVersions} Arazzo ${(0, utils_1.pluralize)('version is', arazzo_1.
|
|
13
|
+
message: `Only ${supportedVersions} Arazzo ${(0, utils_1.pluralize)('version is', arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.length)} supported by Respect.`,
|
|
14
14
|
location: location.child('arazzo'),
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -18,4 +18,4 @@ const SpotSupportedVersions = () => {
|
|
|
18
18
|
},
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
exports.
|
|
21
|
+
exports.RespectSupportedVersions = RespectSupportedVersions;
|
|
@@ -9,7 +9,7 @@ declare const builtInAsync2Rules: readonly ["info-contact", "info-license-strict
|
|
|
9
9
|
declare const builtInAsync3Rules: readonly ["info-contact", "info-license-strict", "operation-operationId", "tag-description", "tags-alphabetical", "channels-kebab-case", "no-channel-trailing-slash"];
|
|
10
10
|
export type BuiltInAsync2RuleId = typeof builtInAsync2Rules[number];
|
|
11
11
|
export type BuiltInAsync3RuleId = typeof builtInAsync3Rules[number];
|
|
12
|
-
declare const builtInArazzo1Rules: readonly ["sourceDescription-type", "workflowId-unique", "stepId-unique", "sourceDescription-name-unique", "sourceDescriptions-not-empty", "workflow-dependsOn", "parameters-unique", "step-onSuccess-unique", "step-onFailure-unique", "
|
|
12
|
+
declare const builtInArazzo1Rules: readonly ["sourceDescription-type", "workflowId-unique", "stepId-unique", "sourceDescription-name-unique", "sourceDescriptions-not-empty", "workflow-dependsOn", "parameters-unique", "step-onSuccess-unique", "step-onFailure-unique", "respect-supported-versions", "requestBody-replacements-unique", "no-criteria-xpath", "criteria-unique"];
|
|
13
13
|
export type BuiltInArazzo1RuleId = typeof builtInArazzo1Rules[number];
|
|
14
14
|
declare const oas2NodeTypesList: readonly ["Root", "Tag", "TagList", "ExternalDocs", "SecurityRequirement", "SecurityRequirementList", "Info", "Contact", "License", "Paths", "PathItem", "Parameter", "ParameterList", "ParameterItems", "Operation", "Example", "ExamplesMap", "Examples", "Header", "Responses", "Response", "Schema", "Xml", "SchemaProperties", "NamedSchemas", "NamedResponses", "NamedParameters", "NamedSecuritySchemes", "SecurityScheme", "TagGroup", "TagGroups", "EnumDescriptions", "Logo", "XCodeSample", "XCodeSampleList", "XServer", "XServerList"];
|
|
15
15
|
export type Oas2NodeType = typeof oas2NodeTypesList[number];
|
|
@@ -139,7 +139,7 @@ const builtInArazzo1Rules = [
|
|
|
139
139
|
'parameters-unique',
|
|
140
140
|
'step-onSuccess-unique',
|
|
141
141
|
'step-onFailure-unique',
|
|
142
|
-
'
|
|
142
|
+
'respect-supported-versions',
|
|
143
143
|
'requestBody-replacements-unique',
|
|
144
144
|
'no-criteria-xpath',
|
|
145
145
|
'criteria-unique',
|
package/lib/typings/arazzo.d.ts
CHANGED
package/lib/typings/arazzo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT = exports.VERSION_PATTERN = void 0;
|
|
4
4
|
exports.VERSION_PATTERN = /^1\.0\.\d+(-.+)?$/;
|
|
5
|
-
exports.
|
|
5
|
+
exports.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT = ['1.0.1'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-core",
|
|
3
|
-
"version": "0.0.0-snapshot.
|
|
3
|
+
"version": "0.0.0-snapshot.1740488474",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"OpenAPI linter",
|
|
29
29
|
"Swagger linter",
|
|
30
30
|
"AsyncAPI linter",
|
|
31
|
+
"Arazzo linter",
|
|
31
32
|
"oas"
|
|
32
33
|
],
|
|
33
34
|
"contributors": [
|
|
File without changes
|