@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
|
@@ -5,17 +5,21 @@ import descriptionTypeLint from "./description--type.mjs";
|
|
|
5
5
|
import descriptionNoScriptTagsLint from "./description--no-script-tags.mjs";
|
|
6
6
|
import operationIdTypeLint from "./operation-id--type.mjs";
|
|
7
7
|
import operationPathTypeLint from "./operation-path--type.mjs";
|
|
8
|
+
import channelPathTypeLint from "./channel-path--type.mjs";
|
|
8
9
|
import workflowIdTypeLint from "./workflow-id--type.mjs";
|
|
10
|
+
import workflowIdPatternLint from "./workflow-id--pattern.mjs";
|
|
9
11
|
import requestBodyTypeLint from "./request-body--type.mjs";
|
|
10
12
|
import successCriteriaTypeLint from "./success-criteria--type.mjs";
|
|
11
13
|
import onSuccessTypeLint from "./on-success--type.mjs";
|
|
12
14
|
import onFailureTypeLint from "./on-failure--type.mjs";
|
|
13
15
|
import outputsTypeLint from "./outputs--type.mjs";
|
|
14
16
|
import outputsKeysPatternLint from "./outputs--keys-pattern.mjs";
|
|
15
|
-
import
|
|
17
|
+
import outputsValuesType10Lint from "./outputs--values-type-1-0.mjs";
|
|
18
|
+
import outputsValuesType11Lint from "./outputs--values-type-1-1.mjs";
|
|
16
19
|
import parametersTypeLint from "./parameters--type.mjs";
|
|
17
20
|
import operationIdMutuallyExclusiveLint from "./operation-id--mutually-exclusive.mjs";
|
|
18
21
|
import operationPathMutuallyExclusiveLint from "./operation-path--mutually-exclusive.mjs";
|
|
22
|
+
import channelPathMutuallyExclusiveLint from "./channel-path--mutually-exclusive.mjs";
|
|
19
23
|
import workflowIdMutuallyExclusiveLint from "./workflow-id--mutually-exclusive.mjs";
|
|
20
24
|
import descriptionRecommendedLint from "./description--recommended.mjs";
|
|
21
25
|
import operationPathPreferOperationIdLint from "./operation-path--prefer-operation-id.mjs";
|
|
@@ -23,6 +27,19 @@ import stepIdUniqueLint from "./step-id--unique.mjs";
|
|
|
23
27
|
import outputsNamesUniqueLint from "./outputs--names-unique.mjs";
|
|
24
28
|
import outputsValuesRuntimeExpressionLint from "./outputs--values-runtime-expression.mjs";
|
|
25
29
|
import workflowIdResolvedLint from "./workflow-id--resolved.mjs";
|
|
26
|
-
import
|
|
27
|
-
|
|
30
|
+
import timeoutTypeLint from "./timeout--type.mjs";
|
|
31
|
+
import correlationIdRequiresActionLint from "./correlation-id--requires-action.mjs";
|
|
32
|
+
import correlationIdOnlyActionReceiveLint from "./correlation-id--only-action-receive.mjs";
|
|
33
|
+
import actionTypeLint from "./action--type.mjs";
|
|
34
|
+
import actionEqualsLint from "./action--equals.mjs";
|
|
35
|
+
import dependsOnTypeLint from "./depends-on--type.mjs";
|
|
36
|
+
import dependsOnUniqueLint from "./depends-on--unique.mjs";
|
|
37
|
+
import dependsOnResolvedLint from "./depends-on--resolved.mjs";
|
|
38
|
+
import operationIdSourceTypeConsistency10Lint from "./operation-id--source-type-consistency-1-0.mjs";
|
|
39
|
+
import operationIdSourceTypeConsistency11Lint from "./operation-id--source-type-consistency-1-1.mjs";
|
|
40
|
+
import workflowIdSourceTypeConsistencyLint from "./workflow-id--source-type-consistency.mjs";
|
|
41
|
+
import dependsOnSourceTypeConsistencyLint from "./depends-on--source-type-consistency.mjs";
|
|
42
|
+
import allowedFields10Lint from "./allowed-fields-1-0.mjs";
|
|
43
|
+
import allowedFields11Lint from "./allowed-fields-1-1.mjs";
|
|
44
|
+
const lints = [stepIdRequiredLint, stepIdTypeLint, stepIdPatternLint, stepIdUniqueLint, descriptionTypeLint, descriptionNoScriptTagsLint, descriptionRecommendedLint, operationIdTypeLint, operationPathTypeLint, channelPathTypeLint, workflowIdTypeLint, workflowIdPatternLint, operationIdMutuallyExclusiveLint, operationPathMutuallyExclusiveLint, channelPathMutuallyExclusiveLint, workflowIdMutuallyExclusiveLint, operationPathPreferOperationIdLint, workflowIdResolvedLint, requestBodyTypeLint, successCriteriaTypeLint, onSuccessTypeLint, onFailureTypeLint, outputsTypeLint, outputsNamesUniqueLint, outputsValuesRuntimeExpressionLint, outputsKeysPatternLint, outputsValuesType10Lint, outputsValuesType11Lint, parametersTypeLint, timeoutTypeLint, correlationIdRequiresActionLint, correlationIdOnlyActionReceiveLint, actionTypeLint, actionEqualsLint, dependsOnTypeLint, dependsOnUniqueLint, dependsOnResolvedLint, operationIdSourceTypeConsistency10Lint, operationIdSourceTypeConsistency11Lint, workflowIdSourceTypeConsistencyLint, dependsOnSourceTypeConsistencyLint, allowedFields10Lint, allowedFields11Lint];
|
|
28
45
|
export default lints;
|
|
@@ -11,10 +11,10 @@ var _targetSpecs = require("../../target-specs.cjs");
|
|
|
11
11
|
const operationIdMutuallyExclusiveLint = {
|
|
12
12
|
code: _codes.default.ARAZZO_STEP_FIELD_OPERATION_ID_MUTUALLY_EXCLUSIVE,
|
|
13
13
|
source: 'apilint',
|
|
14
|
-
message: 'operationId is mutually exclusive with operationPath and workflowId',
|
|
14
|
+
message: 'operationId is mutually exclusive with operationPath, channelPath and workflowId',
|
|
15
15
|
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
16
|
linterFunction: 'missingFields',
|
|
17
|
-
linterParams: [['operationPath', 'workflowId']],
|
|
17
|
+
linterParams: [['operationPath', 'channelPath', 'workflowId']],
|
|
18
18
|
marker: 'key',
|
|
19
19
|
markerTarget: 'operationId',
|
|
20
20
|
conditions: [{
|
|
@@ -4,10 +4,10 @@ import { Arazzo } from "../../target-specs.mjs";
|
|
|
4
4
|
const operationIdMutuallyExclusiveLint = {
|
|
5
5
|
code: ApilintCodes.ARAZZO_STEP_FIELD_OPERATION_ID_MUTUALLY_EXCLUSIVE,
|
|
6
6
|
source: 'apilint',
|
|
7
|
-
message: 'operationId is mutually exclusive with operationPath and workflowId',
|
|
7
|
+
message: 'operationId is mutually exclusive with operationPath, channelPath and workflowId',
|
|
8
8
|
severity: DiagnosticSeverity.Error,
|
|
9
9
|
linterFunction: 'missingFields',
|
|
10
|
-
linterParams: [['operationPath', 'workflowId']],
|
|
10
|
+
linterParams: [['operationPath', 'channelPath', 'workflowId']],
|
|
11
11
|
marker: 'key',
|
|
12
12
|
markerTarget: 'operationId',
|
|
13
13
|
conditions: [{
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
// `asyncapi` isn't a valid sourceDescription.type until Arazzo 1.1 (see
|
|
12
|
+
// sourceDescription/lint/type--equals-1-0.ts) - see -1-1.ts for that case.
|
|
13
|
+
const operationIdSourceTypeConsistency10Lint = {
|
|
14
|
+
code: _codes.default.ARAZZO_STEP_FIELD_OPERATION_ID_SOURCE_TYPE,
|
|
15
|
+
source: 'apilint',
|
|
16
|
+
message: "operationId references a sourceDescription that is not of type 'openapi'",
|
|
17
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
18
|
+
linterFunction: 'apilintArazzoSourceDescriptionTypeConsistency',
|
|
19
|
+
linterParams: [['openapi']],
|
|
20
|
+
marker: 'value',
|
|
21
|
+
target: 'operationId',
|
|
22
|
+
data: {},
|
|
23
|
+
targetSpecs: [..._targetSpecs.Arazzo10]
|
|
24
|
+
};
|
|
25
|
+
var _default = exports.default = operationIdSourceTypeConsistency10Lint;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo10 } from "../../target-specs.mjs"; // `asyncapi` isn't a valid sourceDescription.type until Arazzo 1.1 (see
|
|
4
|
+
// sourceDescription/lint/type--equals-1-0.ts) - see -1-1.ts for that case.
|
|
5
|
+
const operationIdSourceTypeConsistency10Lint = {
|
|
6
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_OPERATION_ID_SOURCE_TYPE,
|
|
7
|
+
source: 'apilint',
|
|
8
|
+
message: "operationId references a sourceDescription that is not of type 'openapi'",
|
|
9
|
+
severity: DiagnosticSeverity.Error,
|
|
10
|
+
linterFunction: 'apilintArazzoSourceDescriptionTypeConsistency',
|
|
11
|
+
linterParams: [['openapi']],
|
|
12
|
+
marker: 'value',
|
|
13
|
+
target: 'operationId',
|
|
14
|
+
data: {},
|
|
15
|
+
targetSpecs: [...Arazzo10]
|
|
16
|
+
};
|
|
17
|
+
export default operationIdSourceTypeConsistency10Lint;
|
|
@@ -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 operationIdSourceTypeConsistency11Lint = {
|
|
12
|
+
code: _codes.default.ARAZZO_STEP_FIELD_OPERATION_ID_SOURCE_TYPE,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: "operationId references a sourceDescription that is not of type 'openapi' or 'asyncapi'",
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintArazzoSourceDescriptionTypeConsistency',
|
|
17
|
+
linterParams: [['openapi', 'asyncapi']],
|
|
18
|
+
marker: 'value',
|
|
19
|
+
target: 'operationId',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = operationIdSourceTypeConsistency11Lint;
|
|
@@ -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 operationIdSourceTypeConsistency11Lint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_OPERATION_ID_SOURCE_TYPE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: "operationId references a sourceDescription that is not of type 'openapi' or 'asyncapi'",
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintArazzoSourceDescriptionTypeConsistency',
|
|
10
|
+
linterParams: [['openapi', 'asyncapi']],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'operationId',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default operationIdSourceTypeConsistency11Lint;
|
|
@@ -11,10 +11,10 @@ var _targetSpecs = require("../../target-specs.cjs");
|
|
|
11
11
|
const operationPathMutuallyExclusiveLint = {
|
|
12
12
|
code: _codes.default.ARAZZO_STEP_FIELD_OPERATION_PATH_MUTUALLY_EXCLUSIVE,
|
|
13
13
|
source: 'apilint',
|
|
14
|
-
message: 'operationPath is mutually exclusive with operationId and workflowId',
|
|
14
|
+
message: 'operationPath is mutually exclusive with operationId, channelPath and workflowId',
|
|
15
15
|
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
16
|
linterFunction: 'missingFields',
|
|
17
|
-
linterParams: [['operationId', 'workflowId']],
|
|
17
|
+
linterParams: [['operationId', 'channelPath', 'workflowId']],
|
|
18
18
|
marker: 'key',
|
|
19
19
|
markerTarget: 'operationPath',
|
|
20
20
|
conditions: [{
|
|
@@ -4,10 +4,10 @@ import { Arazzo } from "../../target-specs.mjs";
|
|
|
4
4
|
const operationPathMutuallyExclusiveLint = {
|
|
5
5
|
code: ApilintCodes.ARAZZO_STEP_FIELD_OPERATION_PATH_MUTUALLY_EXCLUSIVE,
|
|
6
6
|
source: 'apilint',
|
|
7
|
-
message: 'operationPath is mutually exclusive with operationId and workflowId',
|
|
7
|
+
message: 'operationPath is mutually exclusive with operationId, channelPath and workflowId',
|
|
8
8
|
severity: DiagnosticSeverity.Error,
|
|
9
9
|
linterFunction: 'missingFields',
|
|
10
|
-
linterParams: [['operationId', 'workflowId']],
|
|
10
|
+
linterParams: [['operationId', 'channelPath', 'workflowId']],
|
|
11
11
|
marker: 'key',
|
|
12
12
|
markerTarget: 'operationPath',
|
|
13
13
|
conditions: [{
|
package/src/config/arazzo/step/lint/{outputs--values-type.cjs → outputs--values-type-1-0.cjs}
RENAMED
|
@@ -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
|
+
// Arazzo 1.0.x: output values must be strings (Runtime Expressions). From Arazzo 1.1 onward,
|
|
12
|
+
// output values may also be a Selector Object - see outputs--values-type-1-1.ts.
|
|
13
|
+
const outputsValuesType10Lint = {
|
|
12
14
|
code: _codes.default.ARAZZO_STEP_FIELD_OUTPUTS_VALUES_TYPE,
|
|
13
15
|
source: 'apilint',
|
|
14
16
|
message: 'output values must be strings (Runtime Expressions)',
|
|
@@ -18,6 +20,6 @@ const outputsValuesTypeLint = {
|
|
|
18
20
|
marker: 'value',
|
|
19
21
|
target: 'outputs',
|
|
20
22
|
data: {},
|
|
21
|
-
targetSpecs: [..._targetSpecs.
|
|
23
|
+
targetSpecs: [..._targetSpecs.Arazzo10]
|
|
22
24
|
};
|
|
23
|
-
var _default = exports.default =
|
|
25
|
+
var _default = exports.default = outputsValuesType10Lint;
|
package/src/config/arazzo/step/lint/{outputs--values-type.mjs → outputs--values-type-1-0.mjs}
RENAMED
|
@@ -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"; // Arazzo 1.0.x: output values must be strings (Runtime Expressions). From Arazzo 1.1 onward,
|
|
4
|
+
// output values may also be a Selector Object - see outputs--values-type-1-1.ts.
|
|
5
|
+
const outputsValuesType10Lint = {
|
|
5
6
|
code: ApilintCodes.ARAZZO_STEP_FIELD_OUTPUTS_VALUES_TYPE,
|
|
6
7
|
source: 'apilint',
|
|
7
8
|
message: 'output values must be strings (Runtime Expressions)',
|
|
@@ -11,6 +12,6 @@ const outputsValuesTypeLint = {
|
|
|
11
12
|
marker: 'value',
|
|
12
13
|
target: 'outputs',
|
|
13
14
|
data: {},
|
|
14
|
-
targetSpecs: [...
|
|
15
|
+
targetSpecs: [...Arazzo10]
|
|
15
16
|
};
|
|
16
|
-
export default
|
|
17
|
+
export default outputsValuesType10Lint;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
// Arazzo 1.1: output values may be a Runtime Expression string or a Selector Object.
|
|
12
|
+
const outputsValuesType11Lint = {
|
|
13
|
+
code: _codes.default.ARAZZO_STEP_FIELD_OUTPUTS_VALUES_TYPE,
|
|
14
|
+
source: 'apilint',
|
|
15
|
+
message: 'output values must be strings (Runtime Expressions) or Selector Objects',
|
|
16
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
17
|
+
linterFunction: 'apilintChildrenOfTypeOrElementClass',
|
|
18
|
+
linterParams: ['string', ['selector']],
|
|
19
|
+
marker: 'value',
|
|
20
|
+
target: 'outputs',
|
|
21
|
+
data: {},
|
|
22
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
23
|
+
};
|
|
24
|
+
var _default = exports.default = outputsValuesType11Lint;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs"; // Arazzo 1.1: output values may be a Runtime Expression string or a Selector Object.
|
|
4
|
+
const outputsValuesType11Lint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_OUTPUTS_VALUES_TYPE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: 'output values must be strings (Runtime Expressions) or Selector Objects',
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintChildrenOfTypeOrElementClass',
|
|
10
|
+
linterParams: ['string', ['selector']],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'outputs',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default outputsValuesType11Lint;
|
|
@@ -11,8 +11,8 @@ var _targetSpecs = require("../../target-specs.cjs");
|
|
|
11
11
|
const stepIdPatternLint = {
|
|
12
12
|
code: _codes.default.ARAZZO_STEP_FIELD_STEP_ID_PATTERN,
|
|
13
13
|
source: 'apilint',
|
|
14
|
-
message: 'stepId
|
|
15
|
-
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.
|
|
14
|
+
message: 'stepId SHOULD match the pattern [A-Za-z0-9_\\-]+',
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Warning,
|
|
16
16
|
linterFunction: 'apilintValueRegex',
|
|
17
17
|
linterParams: ['^[A-Za-z0-9_\\-]+$'],
|
|
18
18
|
marker: 'value',
|
|
@@ -4,8 +4,8 @@ import { Arazzo } from "../../target-specs.mjs";
|
|
|
4
4
|
const stepIdPatternLint = {
|
|
5
5
|
code: ApilintCodes.ARAZZO_STEP_FIELD_STEP_ID_PATTERN,
|
|
6
6
|
source: 'apilint',
|
|
7
|
-
message: 'stepId
|
|
8
|
-
severity: DiagnosticSeverity.
|
|
7
|
+
message: 'stepId SHOULD match the pattern [A-Za-z0-9_\\-]+',
|
|
8
|
+
severity: DiagnosticSeverity.Warning,
|
|
9
9
|
linterFunction: 'apilintValueRegex',
|
|
10
10
|
linterParams: ['^[A-Za-z0-9_\\-]+$'],
|
|
11
11
|
marker: 'value',
|
|
@@ -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 timeoutTypeLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_STEP_FIELD_TIMEOUT_TYPE,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: 'timeout must be an integer',
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintNumber',
|
|
17
|
+
linterParams: [true],
|
|
18
|
+
marker: 'value',
|
|
19
|
+
target: 'timeout',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = timeoutTypeLint;
|
|
@@ -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 timeoutTypeLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_TIMEOUT_TYPE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: 'timeout must be an integer',
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintNumber',
|
|
10
|
+
linterParams: [true],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'timeout',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default timeoutTypeLint;
|
|
@@ -11,10 +11,10 @@ var _targetSpecs = require("../../target-specs.cjs");
|
|
|
11
11
|
const workflowIdMutuallyExclusiveLint = {
|
|
12
12
|
code: _codes.default.ARAZZO_STEP_FIELD_WORKFLOW_ID_MUTUALLY_EXCLUSIVE,
|
|
13
13
|
source: 'apilint',
|
|
14
|
-
message: 'workflowId is mutually exclusive with operationId and
|
|
14
|
+
message: 'workflowId is mutually exclusive with operationId, operationPath and channelPath',
|
|
15
15
|
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
16
|
linterFunction: 'missingFields',
|
|
17
|
-
linterParams: [['operationId', 'operationPath']],
|
|
17
|
+
linterParams: [['operationId', 'operationPath', 'channelPath']],
|
|
18
18
|
marker: 'key',
|
|
19
19
|
markerTarget: 'workflowId',
|
|
20
20
|
conditions: [{
|
|
@@ -4,10 +4,10 @@ import { Arazzo } from "../../target-specs.mjs";
|
|
|
4
4
|
const workflowIdMutuallyExclusiveLint = {
|
|
5
5
|
code: ApilintCodes.ARAZZO_STEP_FIELD_WORKFLOW_ID_MUTUALLY_EXCLUSIVE,
|
|
6
6
|
source: 'apilint',
|
|
7
|
-
message: 'workflowId is mutually exclusive with operationId and
|
|
7
|
+
message: 'workflowId is mutually exclusive with operationId, operationPath and channelPath',
|
|
8
8
|
severity: DiagnosticSeverity.Error,
|
|
9
9
|
linterFunction: 'missingFields',
|
|
10
|
-
linterParams: [['operationId', 'operationPath']],
|
|
10
|
+
linterParams: [['operationId', 'operationPath', 'channelPath']],
|
|
11
11
|
marker: 'key',
|
|
12
12
|
markerTarget: 'workflowId',
|
|
13
13
|
conditions: [{
|
|
@@ -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
|
+
// Unlike the Workflow Object's own `workflowId`, a step's `workflowId` reference MAY instead be
|
|
12
|
+
// a `$sourceDescriptions.` Runtime Expression when it points at an external Arazzo document (see
|
|
13
|
+
// workflow-id--resolved.ts) - so this pattern only applies to the plain, local-id form.
|
|
14
|
+
const workflowIdPatternLint = {
|
|
15
|
+
code: _codes.default.ARAZZO_STEP_FIELD_WORKFLOW_ID_PATTERN,
|
|
16
|
+
source: 'apilint',
|
|
17
|
+
message: 'workflowId SHOULD match the pattern [A-Za-z0-9_\\-]+',
|
|
18
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Warning,
|
|
19
|
+
linterFunction: 'apilintValueRegex',
|
|
20
|
+
linterParams: ['^[A-Za-z0-9_\\-]+$'],
|
|
21
|
+
marker: 'value',
|
|
22
|
+
target: 'workflowId',
|
|
23
|
+
conditions: [{
|
|
24
|
+
targets: [{
|
|
25
|
+
path: 'workflowId'
|
|
26
|
+
}],
|
|
27
|
+
function: 'apilintValueRegex',
|
|
28
|
+
params: ['^\\$'],
|
|
29
|
+
negate: true
|
|
30
|
+
}],
|
|
31
|
+
data: {},
|
|
32
|
+
targetSpecs: [..._targetSpecs.Arazzo]
|
|
33
|
+
};
|
|
34
|
+
var _default = exports.default = workflowIdPatternLint;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo } from "../../target-specs.mjs"; // Unlike the Workflow Object's own `workflowId`, a step's `workflowId` reference MAY instead be
|
|
4
|
+
// a `$sourceDescriptions.` Runtime Expression when it points at an external Arazzo document (see
|
|
5
|
+
// workflow-id--resolved.ts) - so this pattern only applies to the plain, local-id form.
|
|
6
|
+
const workflowIdPatternLint = {
|
|
7
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_WORKFLOW_ID_PATTERN,
|
|
8
|
+
source: 'apilint',
|
|
9
|
+
message: 'workflowId SHOULD match the pattern [A-Za-z0-9_\\-]+',
|
|
10
|
+
severity: DiagnosticSeverity.Warning,
|
|
11
|
+
linterFunction: 'apilintValueRegex',
|
|
12
|
+
linterParams: ['^[A-Za-z0-9_\\-]+$'],
|
|
13
|
+
marker: 'value',
|
|
14
|
+
target: 'workflowId',
|
|
15
|
+
conditions: [{
|
|
16
|
+
targets: [{
|
|
17
|
+
path: 'workflowId'
|
|
18
|
+
}],
|
|
19
|
+
function: 'apilintValueRegex',
|
|
20
|
+
params: ['^\\$'],
|
|
21
|
+
negate: true
|
|
22
|
+
}],
|
|
23
|
+
data: {},
|
|
24
|
+
targetSpecs: [...Arazzo]
|
|
25
|
+
};
|
|
26
|
+
export default workflowIdPatternLint;
|
|
@@ -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 workflowIdSourceTypeConsistencyLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_STEP_FIELD_WORKFLOW_ID_SOURCE_TYPE,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: "workflowId references a sourceDescription that is not of type 'arazzo'",
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintArazzoSourceDescriptionTypeConsistency',
|
|
17
|
+
linterParams: [['arazzo']],
|
|
18
|
+
marker: 'value',
|
|
19
|
+
target: 'workflowId',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo]
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = workflowIdSourceTypeConsistencyLint;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo } from "../../target-specs.mjs";
|
|
4
|
+
const workflowIdSourceTypeConsistencyLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_STEP_FIELD_WORKFLOW_ID_SOURCE_TYPE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: "workflowId references a sourceDescription that is not of type 'arazzo'",
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintArazzoSourceDescriptionTypeConsistency',
|
|
10
|
+
linterParams: [['arazzo']],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'workflowId',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo]
|
|
15
|
+
};
|
|
16
|
+
export default workflowIdSourceTypeConsistencyLint;
|
|
@@ -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
|
+
// `parameters` doesn't exist on the Success Action Object in Arazzo 1.0 - see
|
|
12
|
+
// 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',
|
|
@@ -20,6 +22,6 @@ const allowedFieldsLint = {
|
|
|
20
22
|
function: 'missingField',
|
|
21
23
|
params: ['reference']
|
|
22
24
|
}],
|
|
23
|
-
targetSpecs: [..._targetSpecs.
|
|
25
|
+
targetSpecs: [..._targetSpecs.Arazzo10]
|
|
24
26
|
};
|
|
25
|
-
var _default = exports.default =
|
|
27
|
+
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"; // `parameters` doesn't exist on the Success Action Object in Arazzo 1.0 - see
|
|
4
|
+
// 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',
|
|
@@ -13,6 +14,6 @@ const allowedFieldsLint = {
|
|
|
13
14
|
function: 'missingField',
|
|
14
15
|
params: ['reference']
|
|
15
16
|
}],
|
|
16
|
-
targetSpecs: [...
|
|
17
|
+
targetSpecs: [...Arazzo10]
|
|
17
18
|
};
|
|
18
|
-
export default
|
|
19
|
+
export default allowedFields10Lint;
|
|
@@ -0,0 +1,25 @@
|
|
|
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: [['name', 'type', 'workflowId', 'stepId', 'parameters', 'criteria'], 'x-'],
|
|
18
|
+
marker: 'key',
|
|
19
|
+
conditions: [{
|
|
20
|
+
function: 'missingField',
|
|
21
|
+
params: ['reference']
|
|
22
|
+
}],
|
|
23
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
24
|
+
};
|
|
25
|
+
var _default = exports.default = allowedFields11Lint;
|
|
@@ -0,0 +1,18 @@
|
|
|
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: [['name', 'type', 'workflowId', 'stepId', 'parameters', 'criteria'], 'x-'],
|
|
11
|
+
marker: 'key',
|
|
12
|
+
conditions: [{
|
|
13
|
+
function: 'missingField',
|
|
14
|
+
params: ['reference']
|
|
15
|
+
}],
|
|
16
|
+
targetSpecs: [...Arazzo11]
|
|
17
|
+
};
|
|
18
|
+
export default allowedFields11Lint;
|
|
@@ -11,13 +11,19 @@ var _typeRequired = _interopRequireDefault(require("./type--required.cjs"));
|
|
|
11
11
|
var _typeType = _interopRequireDefault(require("./type--type.cjs"));
|
|
12
12
|
var _typeEquals = _interopRequireDefault(require("./type--equals.cjs"));
|
|
13
13
|
var _workflowIdType = _interopRequireDefault(require("./workflow-id--type.cjs"));
|
|
14
|
+
var _workflowIdPattern = _interopRequireDefault(require("./workflow-id--pattern.cjs"));
|
|
15
|
+
var _workflowIdSourceTypeConsistency = _interopRequireDefault(require("./workflow-id--source-type-consistency.cjs"));
|
|
14
16
|
var _stepIdType = _interopRequireDefault(require("./step-id--type.cjs"));
|
|
17
|
+
var _stepIdPattern = _interopRequireDefault(require("./step-id--pattern.cjs"));
|
|
15
18
|
var _criteriaType = _interopRequireDefault(require("./criteria--type.cjs"));
|
|
19
|
+
var _parametersType = _interopRequireDefault(require("./parameters--type.cjs"));
|
|
20
|
+
var _parametersOnlyWorkflowId = _interopRequireDefault(require("./parameters--only-workflow-id.cjs"));
|
|
16
21
|
var _workflowIdMutuallyExclusive = _interopRequireDefault(require("./workflow-id--mutually-exclusive.cjs"));
|
|
17
22
|
var _stepIdMutuallyExclusive = _interopRequireDefault(require("./step-id--mutually-exclusive.cjs"));
|
|
18
23
|
var _workflowIdResolved = _interopRequireDefault(require("./workflow-id--resolved.cjs"));
|
|
19
24
|
var _stepIdResolved = _interopRequireDefault(require("./step-id--resolved.cjs"));
|
|
20
25
|
var _nameUnique = _interopRequireDefault(require("./name--unique.cjs"));
|
|
21
|
-
var _allowedFields = _interopRequireDefault(require("./allowed-fields.cjs"));
|
|
22
|
-
|
|
26
|
+
var _allowedFields = _interopRequireDefault(require("./allowed-fields-1-0.cjs"));
|
|
27
|
+
var _allowedFields2 = _interopRequireDefault(require("./allowed-fields-1-1.cjs"));
|
|
28
|
+
const lints = [_nameRequired.default, _nameType.default, _nameUnique.default, _typeRequired.default, _typeType.default, _typeEquals.default, _workflowIdType.default, _workflowIdPattern.default, _workflowIdSourceTypeConsistency.default, _stepIdType.default, _stepIdPattern.default, _workflowIdMutuallyExclusive.default, _stepIdMutuallyExclusive.default, _workflowIdResolved.default, _stepIdResolved.default, _criteriaType.default, _parametersType.default, _parametersOnlyWorkflowId.default, _allowedFields.default, _allowedFields2.default];
|
|
23
29
|
var _default = exports.default = lints;
|
|
@@ -4,13 +4,19 @@ import typeRequiredLint from "./type--required.mjs";
|
|
|
4
4
|
import typeTypeLint from "./type--type.mjs";
|
|
5
5
|
import typeEqualsLint from "./type--equals.mjs";
|
|
6
6
|
import workflowIdTypeLint from "./workflow-id--type.mjs";
|
|
7
|
+
import workflowIdPatternLint from "./workflow-id--pattern.mjs";
|
|
8
|
+
import workflowIdSourceTypeConsistencyLint from "./workflow-id--source-type-consistency.mjs";
|
|
7
9
|
import stepIdTypeLint from "./step-id--type.mjs";
|
|
10
|
+
import stepIdPatternLint from "./step-id--pattern.mjs";
|
|
8
11
|
import criteriaTypeLint from "./criteria--type.mjs";
|
|
12
|
+
import parametersTypeLint from "./parameters--type.mjs";
|
|
13
|
+
import parametersOnlyWorkflowIdLint from "./parameters--only-workflow-id.mjs";
|
|
9
14
|
import workflowIdMutuallyExclusiveLint from "./workflow-id--mutually-exclusive.mjs";
|
|
10
15
|
import stepIdMutuallyExclusiveLint from "./step-id--mutually-exclusive.mjs";
|
|
11
16
|
import workflowIdResolvedLint from "./workflow-id--resolved.mjs";
|
|
12
17
|
import stepIdResolvedLint from "./step-id--resolved.mjs";
|
|
13
18
|
import nameUniqueLint from "./name--unique.mjs";
|
|
14
|
-
import
|
|
15
|
-
|
|
19
|
+
import allowedFields10Lint from "./allowed-fields-1-0.mjs";
|
|
20
|
+
import allowedFields11Lint from "./allowed-fields-1-1.mjs";
|
|
21
|
+
const lints = [nameRequiredLint, nameTypeLint, nameUniqueLint, typeRequiredLint, typeTypeLint, typeEqualsLint, workflowIdTypeLint, workflowIdPatternLint, workflowIdSourceTypeConsistencyLint, stepIdTypeLint, stepIdPatternLint, workflowIdMutuallyExclusiveLint, stepIdMutuallyExclusiveLint, workflowIdResolvedLint, stepIdResolvedLint, criteriaTypeLint, parametersTypeLint, parametersOnlyWorkflowIdLint, allowedFields10Lint, allowedFields11Lint];
|
|
16
22
|
export default lints;
|