@speclynx/apidom-ls 2.11.7 → 2.12.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/CHANGELOG.md +6 -0
- package/dist/apidom-ls.browser.min.js +3 -3
- package/package.json +35 -30
- package/src/config/arazzo/arazzoSpecification1/lint/$self--format-uri.cjs +23 -0
- package/src/config/arazzo/arazzoSpecification1/lint/$self--format-uri.mjs +16 -0
- package/src/config/arazzo/arazzoSpecification1/lint/$self--no-fragment.cjs +23 -0
- package/src/config/arazzo/arazzoSpecification1/lint/$self--no-fragment.mjs +16 -0
- package/src/config/arazzo/arazzoSpecification1/lint/$self--type.cjs +23 -0
- package/src/config/arazzo/arazzoSpecification1/lint/$self--type.mjs +16 -0
- package/src/config/arazzo/arazzoSpecification1/lint/{allowed-fields.cjs → allowed-fields-1-0.cjs} +4 -3
- package/src/config/arazzo/arazzoSpecification1/lint/{allowed-fields.mjs → allowed-fields-1-0.mjs} +4 -4
- package/src/config/arazzo/arazzoSpecification1/lint/allowed-fields-1-1.cjs +21 -0
- package/src/config/arazzo/arazzoSpecification1/lint/allowed-fields-1-1.mjs +14 -0
- package/src/config/arazzo/arazzoSpecification1/lint/arazzo--pattern.cjs +2 -2
- package/src/config/arazzo/arazzoSpecification1/lint/arazzo--pattern.mjs +2 -2
- package/src/config/arazzo/arazzoSpecification1/lint/index.cjs +6 -2
- package/src/config/arazzo/arazzoSpecification1/lint/index.mjs +6 -2
- package/src/config/arazzo/config.cjs +6 -4
- package/src/config/arazzo/config.mjs +4 -2
- package/src/config/arazzo/criterion/lint/type--equals.cjs +1 -1
- package/src/config/arazzo/criterion/lint/type--equals.mjs +1 -1
- package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/index.cjs +7 -3
- package/src/config/arazzo/expressionType/lint/index.mjs +12 -0
- package/src/config/arazzo/{criterionExpressionType/lint/type--equals.cjs → expressionType/lint/type--equals-1-0.cjs} +5 -4
- package/src/config/arazzo/{criterionExpressionType/lint/type--equals.mjs → expressionType/lint/type--equals-1-0.mjs} +5 -5
- package/src/config/arazzo/expressionType/lint/type--equals-1-1.cjs +23 -0
- package/src/config/arazzo/expressionType/lint/type--equals-1-1.mjs +16 -0
- package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/type--required.cjs +1 -1
- package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/type--required.mjs +1 -1
- package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/type--type.cjs +1 -1
- package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/type--type.mjs +1 -1
- package/src/config/arazzo/expressionType/lint/version--equals-jsonpath.cjs +30 -0
- package/src/config/arazzo/expressionType/lint/version--equals-jsonpath.mjs +23 -0
- package/src/config/arazzo/expressionType/lint/version--equals-jsonpointer.cjs +30 -0
- package/src/config/arazzo/expressionType/lint/version--equals-jsonpointer.mjs +23 -0
- package/src/config/arazzo/expressionType/lint/version--equals-xpath.cjs +30 -0
- package/src/config/arazzo/expressionType/lint/version--equals-xpath.mjs +23 -0
- package/src/config/arazzo/{criterionExpressionType/lint/version--required.cjs → expressionType/lint/version--required-1-0.cjs} +9 -4
- package/src/config/arazzo/expressionType/lint/version--required-1-0.mjs +26 -0
- package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/version--type.cjs +1 -1
- package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/version--type.mjs +1 -1
- package/src/config/arazzo/failureAction/lint/allowed-fields-1-0.cjs +27 -0
- package/src/config/arazzo/failureAction/lint/allowed-fields-1-0.mjs +19 -0
- package/src/config/arazzo/failureAction/lint/{allowed-fields.cjs → allowed-fields-1-1.cjs} +4 -4
- package/src/config/arazzo/failureAction/lint/{allowed-fields.mjs → allowed-fields-1-1.mjs} +5 -5
- package/src/config/arazzo/failureAction/lint/index.cjs +8 -2
- package/src/config/arazzo/failureAction/lint/index.mjs +8 -2
- package/src/config/arazzo/failureAction/lint/parameters--only-workflow-id.cjs +28 -0
- package/src/config/arazzo/failureAction/lint/parameters--only-workflow-id.mjs +21 -0
- package/src/config/arazzo/failureAction/lint/parameters--type.cjs +23 -0
- package/src/config/arazzo/failureAction/lint/parameters--type.mjs +16 -0
- package/src/config/arazzo/failureAction/lint/step-id--pattern.cjs +26 -0
- package/src/config/arazzo/failureAction/lint/step-id--pattern.mjs +18 -0
- package/src/config/arazzo/failureAction/lint/workflow-id--pattern.cjs +35 -0
- package/src/config/arazzo/failureAction/lint/workflow-id--pattern.mjs +27 -0
- package/src/config/arazzo/failureAction/lint/workflow-id--source-type-consistency.cjs +23 -0
- package/src/config/arazzo/failureAction/lint/workflow-id--source-type-consistency.mjs +16 -0
- package/src/config/arazzo/payloadReplacement/lint/allowed-fields-1-0.cjs +23 -0
- package/src/config/arazzo/payloadReplacement/lint/allowed-fields-1-0.mjs +15 -0
- package/src/config/arazzo/payloadReplacement/lint/allowed-fields-1-1.cjs +21 -0
- package/src/config/arazzo/payloadReplacement/lint/allowed-fields-1-1.mjs +14 -0
- package/src/config/arazzo/payloadReplacement/lint/index.cjs +5 -2
- package/src/config/arazzo/payloadReplacement/lint/index.mjs +5 -2
- package/src/config/arazzo/payloadReplacement/lint/target-selector-type--equals.cjs +30 -0
- package/src/config/arazzo/payloadReplacement/lint/target-selector-type--equals.mjs +23 -0
- package/src/config/arazzo/payloadReplacement/lint/target-selector-type--type.cjs +31 -0
- package/src/config/arazzo/payloadReplacement/lint/target-selector-type--type.mjs +24 -0
- package/src/config/arazzo/{payloadReplacement → selector}/lint/allowed-fields.cjs +2 -2
- package/src/config/arazzo/{payloadReplacement → selector}/lint/allowed-fields.mjs +3 -3
- package/src/config/arazzo/selector/lint/context--type.cjs +23 -0
- package/src/config/arazzo/selector/lint/context--type.mjs +16 -0
- package/src/config/arazzo/selector/lint/index.cjs +18 -0
- package/src/config/arazzo/selector/lint/index.mjs +10 -0
- package/src/config/arazzo/selector/lint/selector--type.cjs +23 -0
- package/src/config/arazzo/selector/lint/selector--type.mjs +16 -0
- package/src/config/arazzo/selector/lint/type--equals.cjs +30 -0
- package/src/config/arazzo/selector/lint/type--equals.mjs +23 -0
- package/src/config/arazzo/selector/lint/type--type.cjs +31 -0
- package/src/config/arazzo/selector/lint/type--type.mjs +24 -0
- package/src/config/arazzo/selector/meta.cjs +12 -0
- package/src/config/arazzo/selector/meta.mjs +5 -0
- package/src/config/arazzo/sourceDescription/lint/index.cjs +3 -2
- package/src/config/arazzo/sourceDescription/lint/index.mjs +3 -2
- package/src/config/arazzo/sourceDescription/lint/name--pattern.cjs +2 -2
- package/src/config/arazzo/sourceDescription/lint/name--pattern.mjs +2 -2
- package/src/config/arazzo/sourceDescription/lint/{type--equals.cjs → type--equals-1-0.cjs} +3 -3
- package/src/config/arazzo/sourceDescription/lint/{type--equals.mjs → type--equals-1-0.mjs} +4 -4
- package/src/config/arazzo/sourceDescription/lint/type--equals-1-1.cjs +23 -0
- package/src/config/arazzo/sourceDescription/lint/type--equals-1-1.mjs +16 -0
- package/src/config/arazzo/step/lint/action--equals.cjs +23 -0
- package/src/config/arazzo/step/lint/action--equals.mjs +16 -0
- package/src/config/arazzo/step/lint/action--type.cjs +23 -0
- package/src/config/arazzo/step/lint/action--type.mjs +16 -0
- package/src/config/arazzo/step/lint/{allowed-fields.cjs → allowed-fields-1-0.cjs} +5 -3
- package/src/config/arazzo/step/lint/{allowed-fields.mjs → allowed-fields-1-0.mjs} +5 -4
- package/src/config/arazzo/step/lint/allowed-fields-1-1.cjs +21 -0
- package/src/config/arazzo/step/lint/allowed-fields-1-1.mjs +14 -0
- package/src/config/arazzo/step/lint/channel-path--mutually-exclusive.cjs +28 -0
- package/src/config/arazzo/step/lint/channel-path--mutually-exclusive.mjs +21 -0
- package/src/config/arazzo/step/lint/channel-path--type.cjs +23 -0
- package/src/config/arazzo/step/lint/channel-path--type.mjs +16 -0
- package/src/config/arazzo/step/lint/correlation-id--only-action-receive.cjs +34 -0
- package/src/config/arazzo/step/lint/correlation-id--only-action-receive.mjs +26 -0
- package/src/config/arazzo/step/lint/correlation-id--requires-action.cjs +30 -0
- package/src/config/arazzo/step/lint/correlation-id--requires-action.mjs +22 -0
- package/src/config/arazzo/step/lint/depends-on--resolved.cjs +32 -0
- package/src/config/arazzo/step/lint/depends-on--resolved.mjs +24 -0
- package/src/config/arazzo/step/lint/depends-on--source-type-consistency.cjs +23 -0
- package/src/config/arazzo/step/lint/depends-on--source-type-consistency.mjs +16 -0
- package/src/config/arazzo/step/lint/depends-on--type.cjs +23 -0
- package/src/config/arazzo/step/lint/depends-on--type.mjs +16 -0
- package/src/config/arazzo/step/lint/depends-on--unique.cjs +23 -0
- package/src/config/arazzo/step/lint/depends-on--unique.mjs +16 -0
- package/src/config/arazzo/step/lint/index.cjs +20 -3
- package/src/config/arazzo/step/lint/index.mjs +20 -3
- package/src/config/arazzo/step/lint/operation-id--mutually-exclusive.cjs +2 -2
- package/src/config/arazzo/step/lint/operation-id--mutually-exclusive.mjs +2 -2
- package/src/config/arazzo/step/lint/operation-id--source-type-consistency-1-0.cjs +25 -0
- package/src/config/arazzo/step/lint/operation-id--source-type-consistency-1-0.mjs +17 -0
- package/src/config/arazzo/step/lint/operation-id--source-type-consistency-1-1.cjs +23 -0
- package/src/config/arazzo/step/lint/operation-id--source-type-consistency-1-1.mjs +16 -0
- package/src/config/arazzo/step/lint/operation-path--mutually-exclusive.cjs +2 -2
- package/src/config/arazzo/step/lint/operation-path--mutually-exclusive.mjs +2 -2
- package/src/config/arazzo/step/lint/{outputs--values-type.cjs → outputs--values-type-1-0.cjs} +5 -3
- package/src/config/arazzo/step/lint/{outputs--values-type.mjs → outputs--values-type-1-0.mjs} +5 -4
- package/src/config/arazzo/step/lint/outputs--values-type-1-1.cjs +24 -0
- package/src/config/arazzo/step/lint/outputs--values-type-1-1.mjs +16 -0
- package/src/config/arazzo/step/lint/step-id--pattern.cjs +2 -2
- package/src/config/arazzo/step/lint/step-id--pattern.mjs +2 -2
- package/src/config/arazzo/step/lint/timeout--type.cjs +23 -0
- package/src/config/arazzo/step/lint/timeout--type.mjs +16 -0
- package/src/config/arazzo/step/lint/workflow-id--mutually-exclusive.cjs +2 -2
- package/src/config/arazzo/step/lint/workflow-id--mutually-exclusive.mjs +2 -2
- package/src/config/arazzo/step/lint/workflow-id--pattern.cjs +34 -0
- package/src/config/arazzo/step/lint/workflow-id--pattern.mjs +26 -0
- package/src/config/arazzo/step/lint/workflow-id--source-type-consistency.cjs +23 -0
- package/src/config/arazzo/step/lint/workflow-id--source-type-consistency.mjs +16 -0
- package/src/config/arazzo/successAction/lint/{allowed-fields.cjs → allowed-fields-1-0.cjs} +5 -3
- package/src/config/arazzo/successAction/lint/{allowed-fields.mjs → allowed-fields-1-0.mjs} +5 -4
- package/src/config/arazzo/successAction/lint/allowed-fields-1-1.cjs +25 -0
- package/src/config/arazzo/successAction/lint/allowed-fields-1-1.mjs +18 -0
- package/src/config/arazzo/successAction/lint/index.cjs +8 -2
- package/src/config/arazzo/successAction/lint/index.mjs +8 -2
- package/src/config/arazzo/successAction/lint/parameters--only-workflow-id.cjs +28 -0
- package/src/config/arazzo/successAction/lint/parameters--only-workflow-id.mjs +21 -0
- package/src/config/arazzo/successAction/lint/parameters--type.cjs +23 -0
- package/src/config/arazzo/successAction/lint/parameters--type.mjs +16 -0
- package/src/config/arazzo/successAction/lint/step-id--pattern.cjs +26 -0
- package/src/config/arazzo/successAction/lint/step-id--pattern.mjs +18 -0
- package/src/config/arazzo/successAction/lint/workflow-id--pattern.cjs +35 -0
- package/src/config/arazzo/successAction/lint/workflow-id--pattern.mjs +27 -0
- package/src/config/arazzo/successAction/lint/workflow-id--source-type-consistency.cjs +23 -0
- package/src/config/arazzo/successAction/lint/workflow-id--source-type-consistency.mjs +16 -0
- package/src/config/arazzo/target-specs.cjs +33 -5
- package/src/config/arazzo/target-specs.mjs +32 -4
- package/src/config/arazzo/workflow/lint/depends-on--source-type-consistency.cjs +23 -0
- package/src/config/arazzo/workflow/lint/depends-on--source-type-consistency.mjs +16 -0
- package/src/config/arazzo/workflow/lint/index.cjs +4 -2
- package/src/config/arazzo/workflow/lint/index.mjs +4 -2
- package/src/config/arazzo/workflow/lint/{outputs--values-type.cjs → outputs--values-type-1-0.cjs} +5 -3
- package/src/config/arazzo/workflow/lint/{outputs--values-type.mjs → outputs--values-type-1-0.mjs} +5 -4
- package/src/config/arazzo/workflow/lint/outputs--values-type-1-1.cjs +24 -0
- package/src/config/arazzo/workflow/lint/outputs--values-type-1-1.mjs +16 -0
- package/src/config/arazzo/workflow/lint/workflow-id--pattern.cjs +2 -2
- package/src/config/arazzo/workflow/lint/workflow-id--pattern.mjs +2 -2
- package/src/config/codes.cjs +50 -7
- package/src/config/codes.mjs +50 -7
- package/src/index.cjs +7 -0
- package/src/index.mjs +1 -0
- package/src/services/validation/linter-functions.cjs +150 -1
- package/src/services/validation/linter-functions.mjs +151 -2
- package/src/services/validation/providers/arazzo-11-json-schema-validation-provider.cjs +852 -0
- package/src/services/validation/providers/arazzo-11-json-schema-validation-provider.mjs +845 -0
- package/src/services/validation/validation-service.cjs +7 -1
- package/src/services/validation/validation-service.mjs +7 -1
- package/types/apidom-ls.d.ts +82 -7
- package/src/config/arazzo/criterionExpressionType/lint/index.mjs +0 -8
- package/src/config/arazzo/criterionExpressionType/lint/version--required.mjs +0 -22
- /package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/allowed-fields.cjs +0 -0
- /package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/allowed-fields.mjs +0 -0
- /package/src/config/arazzo/{criterionExpressionType → expressionType}/meta.cjs +0 -0
- /package/src/config/arazzo/{criterionExpressionType → expressionType}/meta.mjs +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
|
+
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
const actionEqualsLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_STEP_FIELD_ACTION_EQUALS,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: "action must be one of: 'send', 'receive'",
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintValueOrArray',
|
|
17
|
+
linterParams: [['send', 'receive']],
|
|
18
|
+
marker: 'value',
|
|
19
|
+
target: 'action',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = actionEqualsLint;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs";
|
|
4
|
+
const actionEqualsLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_ACTION_EQUALS,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: "action must be one of: 'send', 'receive'",
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintValueOrArray',
|
|
10
|
+
linterParams: [['send', 'receive']],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'action',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default actionEqualsLint;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
|
+
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
const actionTypeLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_STEP_FIELD_ACTION_TYPE,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: 'action must be a string',
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintType',
|
|
17
|
+
linterParams: ['string'],
|
|
18
|
+
marker: 'value',
|
|
19
|
+
target: 'action',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = actionTypeLint;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs";
|
|
4
|
+
const actionTypeLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_ACTION_TYPE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: 'action must be a string',
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintType',
|
|
10
|
+
linterParams: ['string'],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'action',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default actionTypeLint;
|
|
@@ -8,7 +8,9 @@ exports.default = void 0;
|
|
|
8
8
|
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
9
|
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
10
|
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
-
|
|
11
|
+
// `channelPath`, `timeout`, `correlationId`, `action` and `dependsOn` don't exist on the Step
|
|
12
|
+
// Object in Arazzo 1.0 - see allowed-fields-1-1.ts.
|
|
13
|
+
const allowedFields10Lint = {
|
|
12
14
|
code: _codes.default.NOT_ALLOWED_FIELDS,
|
|
13
15
|
source: 'apilint',
|
|
14
16
|
message: 'Object includes not allowed fields',
|
|
@@ -16,6 +18,6 @@ const allowedFieldsLint = {
|
|
|
16
18
|
linterFunction: 'allowedFields',
|
|
17
19
|
linterParams: [['stepId', 'description', 'operationId', 'operationPath', 'workflowId', 'parameters', 'requestBody', 'successCriteria', 'onSuccess', 'onFailure', 'outputs'], 'x-'],
|
|
18
20
|
marker: 'key',
|
|
19
|
-
targetSpecs: [..._targetSpecs.
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo10]
|
|
20
22
|
};
|
|
21
|
-
var _default = exports.default =
|
|
23
|
+
var _default = exports.default = allowedFields10Lint;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
2
|
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { Arazzo10 } from "../../target-specs.mjs"; // `channelPath`, `timeout`, `correlationId`, `action` and `dependsOn` don't exist on the Step
|
|
4
|
+
// Object in Arazzo 1.0 - see allowed-fields-1-1.ts.
|
|
5
|
+
const allowedFields10Lint = {
|
|
5
6
|
code: ApilintCodes.NOT_ALLOWED_FIELDS,
|
|
6
7
|
source: 'apilint',
|
|
7
8
|
message: 'Object includes not allowed fields',
|
|
@@ -9,6 +10,6 @@ const allowedFieldsLint = {
|
|
|
9
10
|
linterFunction: 'allowedFields',
|
|
10
11
|
linterParams: [['stepId', 'description', 'operationId', 'operationPath', 'workflowId', 'parameters', 'requestBody', 'successCriteria', 'onSuccess', 'onFailure', 'outputs'], 'x-'],
|
|
11
12
|
marker: 'key',
|
|
12
|
-
targetSpecs: [...
|
|
13
|
+
targetSpecs: [...Arazzo10]
|
|
13
14
|
};
|
|
14
|
-
export default
|
|
15
|
+
export default allowedFields10Lint;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
|
+
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
const allowedFields11Lint = {
|
|
12
|
+
code: _codes.default.NOT_ALLOWED_FIELDS,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: 'Object includes not allowed fields',
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'allowedFields',
|
|
17
|
+
linterParams: [['stepId', 'description', 'operationId', 'operationPath', 'channelPath', 'workflowId', 'parameters', 'requestBody', 'successCriteria', 'onSuccess', 'onFailure', 'outputs', 'timeout', 'correlationId', 'action', 'dependsOn'], 'x-'],
|
|
18
|
+
marker: 'key',
|
|
19
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
20
|
+
};
|
|
21
|
+
var _default = exports.default = allowedFields11Lint;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs";
|
|
4
|
+
const allowedFields11Lint = {
|
|
5
|
+
code: ApilintCodes.NOT_ALLOWED_FIELDS,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: 'Object includes not allowed fields',
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'allowedFields',
|
|
10
|
+
linterParams: [['stepId', 'description', 'operationId', 'operationPath', 'channelPath', 'workflowId', 'parameters', 'requestBody', 'successCriteria', 'onSuccess', 'onFailure', 'outputs', 'timeout', 'correlationId', 'action', 'dependsOn'], 'x-'],
|
|
11
|
+
marker: 'key',
|
|
12
|
+
targetSpecs: [...Arazzo11]
|
|
13
|
+
};
|
|
14
|
+
export default allowedFields11Lint;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
|
+
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
const channelPathMutuallyExclusiveLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_STEP_FIELD_CHANNEL_PATH_MUTUALLY_EXCLUSIVE,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: 'channelPath is mutually exclusive with operationId, operationPath and workflowId',
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'missingFields',
|
|
17
|
+
linterParams: [['operationId', 'operationPath', 'workflowId']],
|
|
18
|
+
marker: 'key',
|
|
19
|
+
markerTarget: 'channelPath',
|
|
20
|
+
conditions: [{
|
|
21
|
+
function: 'missingField',
|
|
22
|
+
params: ['channelPath'],
|
|
23
|
+
negate: true
|
|
24
|
+
}],
|
|
25
|
+
data: {},
|
|
26
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
27
|
+
};
|
|
28
|
+
var _default = exports.default = channelPathMutuallyExclusiveLint;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs";
|
|
4
|
+
const channelPathMutuallyExclusiveLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_CHANNEL_PATH_MUTUALLY_EXCLUSIVE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: 'channelPath is mutually exclusive with operationId, operationPath and workflowId',
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'missingFields',
|
|
10
|
+
linterParams: [['operationId', 'operationPath', 'workflowId']],
|
|
11
|
+
marker: 'key',
|
|
12
|
+
markerTarget: 'channelPath',
|
|
13
|
+
conditions: [{
|
|
14
|
+
function: 'missingField',
|
|
15
|
+
params: ['channelPath'],
|
|
16
|
+
negate: true
|
|
17
|
+
}],
|
|
18
|
+
data: {},
|
|
19
|
+
targetSpecs: [...Arazzo11]
|
|
20
|
+
};
|
|
21
|
+
export default channelPathMutuallyExclusiveLint;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
|
+
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
const channelPathTypeLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_STEP_FIELD_CHANNEL_PATH_TYPE,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: 'channelPath must be a string',
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintType',
|
|
17
|
+
linterParams: ['string'],
|
|
18
|
+
marker: 'value',
|
|
19
|
+
target: 'channelPath',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = channelPathTypeLint;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs";
|
|
4
|
+
const channelPathTypeLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_CHANNEL_PATH_TYPE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: 'channelPath must be a string',
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintType',
|
|
10
|
+
linterParams: ['string'],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'channelPath',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default channelPathTypeLint;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
|
+
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
// No `target` here on purpose: the validation service skips a rule entirely when its `target`
|
|
12
|
+
// field is absent from the element, before conditions even run - so targeting `action` directly
|
|
13
|
+
// would silently never fire for a step that has `correlationId` but omits `action`. Operating on
|
|
14
|
+
// the whole step element and reading `action` via `apilintFieldValueOrArray` instead lets this
|
|
15
|
+
// rule fire when `action` is present with the wrong value; the sibling
|
|
16
|
+
// correlation-id--requires-action.ts rule covers the case where `action` is missing entirely.
|
|
17
|
+
const correlationIdOnlyActionReceiveLint = {
|
|
18
|
+
code: _codes.default.ARAZZO_STEP_FIELD_CORRELATION_ID_ONLY_ACTION_RECEIVE,
|
|
19
|
+
source: 'apilint',
|
|
20
|
+
message: "correlationId only applies when action is 'receive'",
|
|
21
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
22
|
+
linterFunction: 'apilintFieldValueOrArray',
|
|
23
|
+
linterParams: ['action', ['receive']],
|
|
24
|
+
marker: 'key',
|
|
25
|
+
markerTarget: 'correlationId',
|
|
26
|
+
conditions: [{
|
|
27
|
+
function: 'missingField',
|
|
28
|
+
params: ['correlationId'],
|
|
29
|
+
negate: true
|
|
30
|
+
}],
|
|
31
|
+
data: {},
|
|
32
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
33
|
+
};
|
|
34
|
+
var _default = exports.default = correlationIdOnlyActionReceiveLint;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs"; // No `target` here on purpose: the validation service skips a rule entirely when its `target`
|
|
4
|
+
// field is absent from the element, before conditions even run - so targeting `action` directly
|
|
5
|
+
// would silently never fire for a step that has `correlationId` but omits `action`. Operating on
|
|
6
|
+
// the whole step element and reading `action` via `apilintFieldValueOrArray` instead lets this
|
|
7
|
+
// rule fire when `action` is present with the wrong value; the sibling
|
|
8
|
+
// correlation-id--requires-action.ts rule covers the case where `action` is missing entirely.
|
|
9
|
+
const correlationIdOnlyActionReceiveLint = {
|
|
10
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_CORRELATION_ID_ONLY_ACTION_RECEIVE,
|
|
11
|
+
source: 'apilint',
|
|
12
|
+
message: "correlationId only applies when action is 'receive'",
|
|
13
|
+
severity: DiagnosticSeverity.Error,
|
|
14
|
+
linterFunction: 'apilintFieldValueOrArray',
|
|
15
|
+
linterParams: ['action', ['receive']],
|
|
16
|
+
marker: 'key',
|
|
17
|
+
markerTarget: 'correlationId',
|
|
18
|
+
conditions: [{
|
|
19
|
+
function: 'missingField',
|
|
20
|
+
params: ['correlationId'],
|
|
21
|
+
negate: true
|
|
22
|
+
}],
|
|
23
|
+
data: {},
|
|
24
|
+
targetSpecs: [...Arazzo11]
|
|
25
|
+
};
|
|
26
|
+
export default correlationIdOnlyActionReceiveLint;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
|
+
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
// Covers the case correlation-id--only-action-receive.ts cannot: `correlationId` present but
|
|
12
|
+
// `action` omitted entirely.
|
|
13
|
+
const correlationIdRequiresActionLint = {
|
|
14
|
+
code: _codes.default.ARAZZO_STEP_FIELD_CORRELATION_ID_REQUIRES_ACTION,
|
|
15
|
+
source: 'apilint',
|
|
16
|
+
message: "correlationId requires action to be present and set to 'receive'",
|
|
17
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
18
|
+
linterFunction: 'hasRequiredField',
|
|
19
|
+
linterParams: ['action'],
|
|
20
|
+
marker: 'key',
|
|
21
|
+
markerTarget: 'correlationId',
|
|
22
|
+
conditions: [{
|
|
23
|
+
function: 'missingField',
|
|
24
|
+
params: ['correlationId'],
|
|
25
|
+
negate: true
|
|
26
|
+
}],
|
|
27
|
+
data: {},
|
|
28
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
29
|
+
};
|
|
30
|
+
var _default = exports.default = correlationIdRequiresActionLint;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs"; // Covers the case correlation-id--only-action-receive.ts cannot: `correlationId` present but
|
|
4
|
+
// `action` omitted entirely.
|
|
5
|
+
const correlationIdRequiresActionLint = {
|
|
6
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_CORRELATION_ID_REQUIRES_ACTION,
|
|
7
|
+
source: 'apilint',
|
|
8
|
+
message: "correlationId requires action to be present and set to 'receive'",
|
|
9
|
+
severity: DiagnosticSeverity.Error,
|
|
10
|
+
linterFunction: 'hasRequiredField',
|
|
11
|
+
linterParams: ['action'],
|
|
12
|
+
marker: 'key',
|
|
13
|
+
markerTarget: 'correlationId',
|
|
14
|
+
conditions: [{
|
|
15
|
+
function: 'missingField',
|
|
16
|
+
params: ['correlationId'],
|
|
17
|
+
negate: true
|
|
18
|
+
}],
|
|
19
|
+
data: {},
|
|
20
|
+
targetSpecs: [...Arazzo11]
|
|
21
|
+
};
|
|
22
|
+
export default correlationIdRequiresActionLint;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
|
+
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
// No `target` here on purpose: to resolve a plain stepId entry we need the current workflow's
|
|
12
|
+
// sibling steps, which is only reachable from the step element's own parent (the `steps` array),
|
|
13
|
+
// not from the `dependsOn` array's parent. That means the positioning logic can't use `target` +
|
|
14
|
+
// `marker: 'value'` either (it reads the same `meta.target` the linterFunction would receive, so
|
|
15
|
+
// setting it would hand the linterFunction the array instead of the step). `marker: 'key'` +
|
|
16
|
+
// `markerTarget` positions off `markerTarget`'s own parent independently of `target`, so it's
|
|
17
|
+
// used here instead - same pattern as correlation-id--only-action-receive.ts and
|
|
18
|
+
// correlation-id--requires-action.ts, which have the same "linterFunction needs the whole step"
|
|
19
|
+
// constraint.
|
|
20
|
+
const dependsOnResolvedLint = {
|
|
21
|
+
code: _codes.default.ARAZZO_STEP_FIELD_DEPENDS_ON_RESOLVED,
|
|
22
|
+
source: 'apilint',
|
|
23
|
+
message: '"dependsOn" entries must reference an existing stepId or a valid runtime expression.',
|
|
24
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
25
|
+
linterFunction: 'apilintArazzoStepDependsOnResolved',
|
|
26
|
+
linterParams: [],
|
|
27
|
+
marker: 'key',
|
|
28
|
+
markerTarget: 'dependsOn',
|
|
29
|
+
data: {},
|
|
30
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
31
|
+
};
|
|
32
|
+
var _default = exports.default = dependsOnResolvedLint;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs"; // No `target` here on purpose: to resolve a plain stepId entry we need the current workflow's
|
|
4
|
+
// sibling steps, which is only reachable from the step element's own parent (the `steps` array),
|
|
5
|
+
// not from the `dependsOn` array's parent. That means the positioning logic can't use `target` +
|
|
6
|
+
// `marker: 'value'` either (it reads the same `meta.target` the linterFunction would receive, so
|
|
7
|
+
// setting it would hand the linterFunction the array instead of the step). `marker: 'key'` +
|
|
8
|
+
// `markerTarget` positions off `markerTarget`'s own parent independently of `target`, so it's
|
|
9
|
+
// used here instead - same pattern as correlation-id--only-action-receive.ts and
|
|
10
|
+
// correlation-id--requires-action.ts, which have the same "linterFunction needs the whole step"
|
|
11
|
+
// constraint.
|
|
12
|
+
const dependsOnResolvedLint = {
|
|
13
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_DEPENDS_ON_RESOLVED,
|
|
14
|
+
source: 'apilint',
|
|
15
|
+
message: '"dependsOn" entries must reference an existing stepId or a valid runtime expression.',
|
|
16
|
+
severity: DiagnosticSeverity.Error,
|
|
17
|
+
linterFunction: 'apilintArazzoStepDependsOnResolved',
|
|
18
|
+
linterParams: [],
|
|
19
|
+
marker: 'key',
|
|
20
|
+
markerTarget: 'dependsOn',
|
|
21
|
+
data: {},
|
|
22
|
+
targetSpecs: [...Arazzo11]
|
|
23
|
+
};
|
|
24
|
+
export default dependsOnResolvedLint;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
|
+
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
const dependsOnSourceTypeConsistencyLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_STEP_FIELD_DEPENDS_ON_SOURCE_TYPE,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: "dependsOn entry references a sourceDescription that is not of type 'arazzo'",
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintArazzoArraySourceDescriptionTypeConsistency',
|
|
17
|
+
linterParams: [['arazzo']],
|
|
18
|
+
marker: 'value',
|
|
19
|
+
target: 'dependsOn',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = dependsOnSourceTypeConsistencyLint;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs";
|
|
4
|
+
const dependsOnSourceTypeConsistencyLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_DEPENDS_ON_SOURCE_TYPE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: "dependsOn entry references a sourceDescription that is not of type 'arazzo'",
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintArazzoArraySourceDescriptionTypeConsistency',
|
|
10
|
+
linterParams: [['arazzo']],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'dependsOn',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default dependsOnSourceTypeConsistencyLint;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
|
+
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
const dependsOnTypeLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_STEP_FIELD_DEPENDS_ON_TYPE,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: 'dependsOn must be an array of strings',
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintArrayOfType',
|
|
17
|
+
linterParams: ['string'],
|
|
18
|
+
marker: 'key',
|
|
19
|
+
target: 'dependsOn',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = dependsOnTypeLint;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs";
|
|
4
|
+
const dependsOnTypeLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_DEPENDS_ON_TYPE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: 'dependsOn must be an array of strings',
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintArrayOfType',
|
|
10
|
+
linterParams: ['string'],
|
|
11
|
+
marker: 'key',
|
|
12
|
+
target: 'dependsOn',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default dependsOnTypeLint;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
|
+
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
const dependsOnUniqueLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_STEP_FIELD_DEPENDS_ON_UNIQUE,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: "'dependsOn' entries must be unique.",
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintArrayUniqueValues',
|
|
17
|
+
target: 'dependsOn',
|
|
18
|
+
marker: 'value',
|
|
19
|
+
markerTarget: 'dependsOn',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = dependsOnUniqueLint;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs";
|
|
4
|
+
const dependsOnUniqueLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_DEPENDS_ON_UNIQUE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: "'dependsOn' entries must be unique.",
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintArrayUniqueValues',
|
|
10
|
+
target: 'dependsOn',
|
|
11
|
+
marker: 'value',
|
|
12
|
+
markerTarget: 'dependsOn',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default dependsOnUniqueLint;
|
|
@@ -12,17 +12,21 @@ var _descriptionType = _interopRequireDefault(require("./description--type.cjs")
|
|
|
12
12
|
var _descriptionNoScriptTags = _interopRequireDefault(require("./description--no-script-tags.cjs"));
|
|
13
13
|
var _operationIdType = _interopRequireDefault(require("./operation-id--type.cjs"));
|
|
14
14
|
var _operationPathType = _interopRequireDefault(require("./operation-path--type.cjs"));
|
|
15
|
+
var _channelPathType = _interopRequireDefault(require("./channel-path--type.cjs"));
|
|
15
16
|
var _workflowIdType = _interopRequireDefault(require("./workflow-id--type.cjs"));
|
|
17
|
+
var _workflowIdPattern = _interopRequireDefault(require("./workflow-id--pattern.cjs"));
|
|
16
18
|
var _requestBodyType = _interopRequireDefault(require("./request-body--type.cjs"));
|
|
17
19
|
var _successCriteriaType = _interopRequireDefault(require("./success-criteria--type.cjs"));
|
|
18
20
|
var _onSuccessType = _interopRequireDefault(require("./on-success--type.cjs"));
|
|
19
21
|
var _onFailureType = _interopRequireDefault(require("./on-failure--type.cjs"));
|
|
20
22
|
var _outputsType = _interopRequireDefault(require("./outputs--type.cjs"));
|
|
21
23
|
var _outputsKeysPattern = _interopRequireDefault(require("./outputs--keys-pattern.cjs"));
|
|
22
|
-
var _outputsValuesType = _interopRequireDefault(require("./outputs--values-type.cjs"));
|
|
24
|
+
var _outputsValuesType = _interopRequireDefault(require("./outputs--values-type-1-0.cjs"));
|
|
25
|
+
var _outputsValuesType2 = _interopRequireDefault(require("./outputs--values-type-1-1.cjs"));
|
|
23
26
|
var _parametersType = _interopRequireDefault(require("./parameters--type.cjs"));
|
|
24
27
|
var _operationIdMutuallyExclusive = _interopRequireDefault(require("./operation-id--mutually-exclusive.cjs"));
|
|
25
28
|
var _operationPathMutuallyExclusive = _interopRequireDefault(require("./operation-path--mutually-exclusive.cjs"));
|
|
29
|
+
var _channelPathMutuallyExclusive = _interopRequireDefault(require("./channel-path--mutually-exclusive.cjs"));
|
|
26
30
|
var _workflowIdMutuallyExclusive = _interopRequireDefault(require("./workflow-id--mutually-exclusive.cjs"));
|
|
27
31
|
var _descriptionRecommended = _interopRequireDefault(require("./description--recommended.cjs"));
|
|
28
32
|
var _operationPathPreferOperationId = _interopRequireDefault(require("./operation-path--prefer-operation-id.cjs"));
|
|
@@ -30,6 +34,19 @@ var _stepIdUnique = _interopRequireDefault(require("./step-id--unique.cjs"));
|
|
|
30
34
|
var _outputsNamesUnique = _interopRequireDefault(require("./outputs--names-unique.cjs"));
|
|
31
35
|
var _outputsValuesRuntimeExpression = _interopRequireDefault(require("./outputs--values-runtime-expression.cjs"));
|
|
32
36
|
var _workflowIdResolved = _interopRequireDefault(require("./workflow-id--resolved.cjs"));
|
|
33
|
-
var
|
|
34
|
-
|
|
37
|
+
var _timeoutType = _interopRequireDefault(require("./timeout--type.cjs"));
|
|
38
|
+
var _correlationIdRequiresAction = _interopRequireDefault(require("./correlation-id--requires-action.cjs"));
|
|
39
|
+
var _correlationIdOnlyActionReceive = _interopRequireDefault(require("./correlation-id--only-action-receive.cjs"));
|
|
40
|
+
var _actionType = _interopRequireDefault(require("./action--type.cjs"));
|
|
41
|
+
var _actionEquals = _interopRequireDefault(require("./action--equals.cjs"));
|
|
42
|
+
var _dependsOnType = _interopRequireDefault(require("./depends-on--type.cjs"));
|
|
43
|
+
var _dependsOnUnique = _interopRequireDefault(require("./depends-on--unique.cjs"));
|
|
44
|
+
var _dependsOnResolved = _interopRequireDefault(require("./depends-on--resolved.cjs"));
|
|
45
|
+
var _operationIdSourceTypeConsistency = _interopRequireDefault(require("./operation-id--source-type-consistency-1-0.cjs"));
|
|
46
|
+
var _operationIdSourceTypeConsistency2 = _interopRequireDefault(require("./operation-id--source-type-consistency-1-1.cjs"));
|
|
47
|
+
var _workflowIdSourceTypeConsistency = _interopRequireDefault(require("./workflow-id--source-type-consistency.cjs"));
|
|
48
|
+
var _dependsOnSourceTypeConsistency = _interopRequireDefault(require("./depends-on--source-type-consistency.cjs"));
|
|
49
|
+
var _allowedFields = _interopRequireDefault(require("./allowed-fields-1-0.cjs"));
|
|
50
|
+
var _allowedFields2 = _interopRequireDefault(require("./allowed-fields-1-1.cjs"));
|
|
51
|
+
const lints = [_stepIdRequired.default, _stepIdType.default, _stepIdPattern.default, _stepIdUnique.default, _descriptionType.default, _descriptionNoScriptTags.default, _descriptionRecommended.default, _operationIdType.default, _operationPathType.default, _channelPathType.default, _workflowIdType.default, _workflowIdPattern.default, _operationIdMutuallyExclusive.default, _operationPathMutuallyExclusive.default, _channelPathMutuallyExclusive.default, _workflowIdMutuallyExclusive.default, _operationPathPreferOperationId.default, _workflowIdResolved.default, _requestBodyType.default, _successCriteriaType.default, _onSuccessType.default, _onFailureType.default, _outputsType.default, _outputsNamesUnique.default, _outputsValuesRuntimeExpression.default, _outputsKeysPattern.default, _outputsValuesType.default, _outputsValuesType2.default, _parametersType.default, _timeoutType.default, _correlationIdRequiresAction.default, _correlationIdOnlyActionReceive.default, _actionType.default, _actionEquals.default, _dependsOnType.default, _dependsOnUnique.default, _dependsOnResolved.default, _operationIdSourceTypeConsistency.default, _operationIdSourceTypeConsistency2.default, _workflowIdSourceTypeConsistency.default, _dependsOnSourceTypeConsistency.default, _allowedFields.default, _allowedFields2.default];
|
|
35
52
|
var _default = exports.default = lints;
|