@speclynx/apidom-ls 2.11.6 → 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 +14 -0
- package/dist/apidom-ls.browser.min.js +3 -3
- package/package.json +35 -30
- package/src/config/arazzo/JSONSchema/{description--no-script-tags.cjs → lint/description--no-script-tags.cjs} +2 -2
- package/src/config/arazzo/JSONSchema/{description--no-script-tags.mjs → lint/description--no-script-tags.mjs} +2 -2
- package/src/config/arazzo/JSONSchema/lint/index.cjs +81 -0
- package/src/config/arazzo/JSONSchema/lint/index.mjs +72 -0
- package/src/config/arazzo/JSONSchema/{title--no-script-tags.cjs → lint/title--no-script-tags.cjs} +2 -2
- package/src/config/arazzo/JSONSchema/{title--no-script-tags.mjs → lint/title--no-script-tags.mjs} +2 -2
- package/src/config/arazzo/JSONSchema/meta.cjs +2 -2
- package/src/config/arazzo/JSONSchema/meta.mjs +1 -1
- 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/{ads/info/lint/title--type.cjs → arazzo/arazzoSpecification1/lint/$self--type.cjs} +8 -6
- package/src/config/{ads/info/lint/description--type.mjs → arazzo/arazzoSpecification1/lint/$self--type.mjs} +8 -6
- 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/{failureAction/lint/allowed-fields.cjs → arazzoSpecification1/lint/allowed-fields-1-1.cjs} +4 -4
- 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-1-1.cjs +25 -0
- package/src/config/arazzo/failureAction/lint/{allowed-fields.mjs → allowed-fields-1-1.mjs} +9 -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/name--required.cjs +4 -0
- package/src/config/arazzo/failureAction/lint/name--required.mjs +4 -0
- 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/type--required.cjs +4 -0
- package/src/config/arazzo/failureAction/lint/type--required.mjs +4 -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/parameter/lint/allowed-fields.cjs +4 -0
- package/src/config/arazzo/parameter/lint/allowed-fields.mjs +4 -0
- package/src/config/arazzo/parameter/lint/name--required.cjs +4 -0
- package/src/config/arazzo/parameter/lint/name--required.mjs +4 -0
- package/src/config/arazzo/parameter/lint/value--required.cjs +4 -0
- package/src/config/arazzo/parameter/lint/value--required.mjs +4 -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/{successAction/lint/allowed-fields.cjs → payloadReplacement/lint/allowed-fields-1-1.cjs} +4 -4
- package/src/config/arazzo/{successAction/lint/allowed-fields.mjs → payloadReplacement/lint/allowed-fields-1-1.mjs} +5 -5
- 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/{ads/info → arazzo/selector}/meta.cjs +1 -5
- 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/{ads/info/lint/description--type.cjs → arazzo/step/lint/action--type.cjs} +8 -6
- 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-1-0.cjs +27 -0
- package/src/config/arazzo/successAction/lint/allowed-fields-1-0.mjs +19 -0
- 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/name--required.cjs +4 -0
- package/src/config/arazzo/successAction/lint/name--required.mjs +4 -0
- 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/type--required.cjs +4 -0
- package/src/config/arazzo/successAction/lint/type--required.mjs +4 -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 -17
- package/src/config/codes.mjs +50 -17
- package/src/config/config.cjs +6 -8
- package/src/config/config.mjs +0 -2
- package/src/config/openapi/schema/lint.cjs +5 -1
- package/src/config/openapi/schema/lint.mjs +5 -1
- package/src/config/symbols.cjs +3 -4
- package/src/config/symbols.mjs +1 -2
- package/src/config/tokens.cjs +5 -6
- package/src/config/tokens.mjs +1 -2
- package/src/index.cjs +7 -0
- package/src/index.mjs +1 -0
- package/src/services/completion/completion-service.cjs +1 -1
- package/src/services/completion/completion-service.mjs +1 -1
- package/src/services/hover/hover-service.cjs +1 -1
- package/src/services/hover/hover-service.mjs +1 -1
- 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 +12 -4
- package/src/services/validation/validation-service.mjs +12 -4
- package/src/utils/utils.cjs +5 -1
- package/src/utils/utils.mjs +5 -1
- package/types/apidom-ls.d.ts +82 -17
- package/src/config/ads/config.cjs +0 -25
- package/src/config/ads/config.mjs +0 -18
- package/src/config/ads/info/completion.cjs +0 -31
- package/src/config/ads/info/completion.mjs +0 -25
- package/src/config/ads/info/documentation.cjs +0 -14
- package/src/config/ads/info/documentation.mjs +0 -8
- package/src/config/ads/info/lint/allowed-fields.cjs +0 -19
- package/src/config/ads/info/lint/allowed-fields.mjs +0 -12
- package/src/config/ads/info/lint/index.cjs +0 -13
- package/src/config/ads/info/lint/index.mjs +0 -6
- package/src/config/ads/info/lint/title--required.cjs +0 -27
- package/src/config/ads/info/lint/title--required.mjs +0 -20
- package/src/config/ads/info/lint/title--type.mjs +0 -14
- package/src/config/ads/info/meta.mjs +0 -9
- package/src/config/ads/main/completion.cjs +0 -72
- package/src/config/ads/main/completion.mjs +0 -66
- package/src/config/ads/main/documentation.cjs +0 -23
- package/src/config/ads/main/documentation.mjs +0 -17
- package/src/config/ads/main/lint/allowed-fields.cjs +0 -19
- package/src/config/ads/main/lint/allowed-fields.mjs +0 -12
- package/src/config/ads/main/lint/index.cjs +0 -14
- package/src/config/ads/main/lint/index.mjs +0 -7
- package/src/config/ads/main/lint/info--required.cjs +0 -27
- package/src/config/ads/main/lint/info--required.mjs +0 -20
- package/src/config/ads/main/lint/info--type.cjs +0 -21
- package/src/config/ads/main/lint/info--type.mjs +0 -14
- package/src/config/ads/main/lint/version--pattern.cjs +0 -27
- package/src/config/ads/main/lint/version--pattern.mjs +0 -20
- package/src/config/ads/main/lint/version--required.cjs +0 -27
- package/src/config/ads/main/lint/version--required.mjs +0 -20
- package/src/config/ads/main/meta.cjs +0 -16
- package/src/config/ads/main/meta.mjs +0 -9
- package/src/config/ads/symbols.cjs +0 -8
- package/src/config/ads/symbols.mjs +0 -2
- package/src/config/ads/tokens.cjs +0 -8
- package/src/config/ads/tokens.mjs +0 -2
- package/src/config/arazzo/JSONSchema/lint.cjs +0 -77
- package/src/config/arazzo/JSONSchema/lint.mjs +0 -68
- 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,16 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs";
|
|
4
|
+
const contextTypeLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_SELECTOR_FIELD_CONTEXT_TYPE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: 'context must be a string (Runtime Expression)',
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintType',
|
|
10
|
+
linterParams: ['string'],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'context',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default contextTypeLint;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 _contextType = _interopRequireDefault(require("./context--type.cjs"));
|
|
9
|
+
var _selectorType = _interopRequireDefault(require("./selector--type.cjs"));
|
|
10
|
+
var _typeType = _interopRequireDefault(require("./type--type.cjs"));
|
|
11
|
+
var _typeEquals = _interopRequireDefault(require("./type--equals.cjs"));
|
|
12
|
+
var _allowedFields = _interopRequireDefault(require("./allowed-fields.cjs"));
|
|
13
|
+
// Note: `context`, `selector` and `type` have no "required" rules here. apidom only
|
|
14
|
+
// disambiguates an object as a `selector` element once all three of those fields are already
|
|
15
|
+
// present (see OAI/Arazzo-Specification#519), so a "required" check on any of them could never
|
|
16
|
+
// fire - an incomplete object simply isn't parsed as `selector` in the first place.
|
|
17
|
+
const lints = [_contextType.default, _selectorType.default, _typeType.default, _typeEquals.default, _allowedFields.default];
|
|
18
|
+
var _default = exports.default = lints;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import contextTypeLint from "./context--type.mjs";
|
|
2
|
+
import selectorTypeLint from "./selector--type.mjs";
|
|
3
|
+
import typeTypeLint from "./type--type.mjs";
|
|
4
|
+
import typeEqualsLint from "./type--equals.mjs";
|
|
5
|
+
import allowedFieldsLint from "./allowed-fields.mjs"; // Note: `context`, `selector` and `type` have no "required" rules here. apidom only
|
|
6
|
+
// disambiguates an object as a `selector` element once all three of those fields are already
|
|
7
|
+
// present (see OAI/Arazzo-Specification#519), so a "required" check on any of them could never
|
|
8
|
+
// fire - an incomplete object simply isn't parsed as `selector` in the first place.
|
|
9
|
+
const lints = [contextTypeLint, selectorTypeLint, typeTypeLint, typeEqualsLint, allowedFieldsLint];
|
|
10
|
+
export default lints;
|
|
@@ -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 selectorTypeLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_SELECTOR_FIELD_SELECTOR_TYPE,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: 'selector must be a string',
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintType',
|
|
17
|
+
linterParams: ['string'],
|
|
18
|
+
marker: 'value',
|
|
19
|
+
target: 'selector',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = selectorTypeLint;
|
|
@@ -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 selectorTypeLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_SELECTOR_FIELD_SELECTOR_TYPE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: 'selector must be a string',
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintType',
|
|
10
|
+
linterParams: ['string'],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'selector',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default selectorTypeLint;
|
|
@@ -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
|
+
const typeEqualsLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_SELECTOR_FIELD_TYPE_EQUALS,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: "type must be one of: 'jsonpointer', 'jsonpath', 'xpath', or an Expression Type Object",
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintValueOrArray',
|
|
17
|
+
linterParams: [['jsonpointer', 'jsonpath', 'xpath']],
|
|
18
|
+
marker: 'value',
|
|
19
|
+
target: 'type',
|
|
20
|
+
conditions: [{
|
|
21
|
+
targets: [{
|
|
22
|
+
path: 'type'
|
|
23
|
+
}],
|
|
24
|
+
function: 'apilintType',
|
|
25
|
+
params: ['string']
|
|
26
|
+
}],
|
|
27
|
+
data: {},
|
|
28
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
29
|
+
};
|
|
30
|
+
var _default = exports.default = typeEqualsLint;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs";
|
|
4
|
+
const typeEqualsLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_SELECTOR_FIELD_TYPE_EQUALS,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: "type must be one of: 'jsonpointer', 'jsonpath', 'xpath', or an Expression Type Object",
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintValueOrArray',
|
|
10
|
+
linterParams: [['jsonpointer', 'jsonpath', 'xpath']],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'type',
|
|
13
|
+
conditions: [{
|
|
14
|
+
targets: [{
|
|
15
|
+
path: 'type'
|
|
16
|
+
}],
|
|
17
|
+
function: 'apilintType',
|
|
18
|
+
params: ['string']
|
|
19
|
+
}],
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [...Arazzo11]
|
|
22
|
+
};
|
|
23
|
+
export default typeEqualsLint;
|
|
@@ -0,0 +1,31 @@
|
|
|
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 typeTypeLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_SELECTOR_FIELD_TYPE_TYPE,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: 'type must be a string or an Expression Type Object',
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintElementOrClass',
|
|
17
|
+
linterParams: [['expressionType']],
|
|
18
|
+
marker: 'value',
|
|
19
|
+
target: 'type',
|
|
20
|
+
conditions: [{
|
|
21
|
+
targets: [{
|
|
22
|
+
path: 'type'
|
|
23
|
+
}],
|
|
24
|
+
function: 'apilintType',
|
|
25
|
+
params: ['string'],
|
|
26
|
+
negate: true
|
|
27
|
+
}],
|
|
28
|
+
data: {},
|
|
29
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
30
|
+
};
|
|
31
|
+
var _default = exports.default = typeTypeLint;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
|
+
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
+
import { Arazzo11 } from "../../target-specs.mjs";
|
|
4
|
+
const typeTypeLint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_SELECTOR_FIELD_TYPE_TYPE,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: 'type must be a string or an Expression Type Object',
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintElementOrClass',
|
|
10
|
+
linterParams: [['expressionType']],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'type',
|
|
13
|
+
conditions: [{
|
|
14
|
+
targets: [{
|
|
15
|
+
path: 'type'
|
|
16
|
+
}],
|
|
17
|
+
function: 'apilintType',
|
|
18
|
+
params: ['string'],
|
|
19
|
+
negate: true
|
|
20
|
+
}],
|
|
21
|
+
data: {},
|
|
22
|
+
targetSpecs: [...Arazzo11]
|
|
23
|
+
};
|
|
24
|
+
export default typeTypeLint;
|
|
@@ -6,11 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _index = _interopRequireDefault(require("./lint/index.cjs"));
|
|
9
|
-
var _completion = _interopRequireDefault(require("./completion.cjs"));
|
|
10
|
-
var _documentation = _interopRequireDefault(require("./documentation.cjs"));
|
|
11
9
|
const meta = {
|
|
12
|
-
lint: _index.default
|
|
13
|
-
completion: _completion.default,
|
|
14
|
-
documentation: _documentation.default
|
|
10
|
+
lint: _index.default
|
|
15
11
|
};
|
|
16
12
|
var _default = exports.default = meta;
|
|
@@ -11,7 +11,8 @@ var _namePattern = _interopRequireDefault(require("./name--pattern.cjs"));
|
|
|
11
11
|
var _urlRequired = _interopRequireDefault(require("./url--required.cjs"));
|
|
12
12
|
var _urlType = _interopRequireDefault(require("./url--type.cjs"));
|
|
13
13
|
var _typeType = _interopRequireDefault(require("./type--type.cjs"));
|
|
14
|
-
var _typeEquals = _interopRequireDefault(require("./type--equals.cjs"));
|
|
14
|
+
var _typeEquals = _interopRequireDefault(require("./type--equals-1-0.cjs"));
|
|
15
|
+
var _typeEquals2 = _interopRequireDefault(require("./type--equals-1-1.cjs"));
|
|
15
16
|
var _allowedFields = _interopRequireDefault(require("./allowed-fields.cjs"));
|
|
16
|
-
const lints = [_nameRequired.default, _nameType.default, _namePattern.default, _urlRequired.default, _urlType.default, _typeType.default, _typeEquals.default, _allowedFields.default];
|
|
17
|
+
const lints = [_nameRequired.default, _nameType.default, _namePattern.default, _urlRequired.default, _urlType.default, _typeType.default, _typeEquals.default, _typeEquals2.default, _allowedFields.default];
|
|
17
18
|
var _default = exports.default = lints;
|
|
@@ -4,7 +4,8 @@ import namePatternLint from "./name--pattern.mjs";
|
|
|
4
4
|
import urlRequiredLint from "./url--required.mjs";
|
|
5
5
|
import urlTypeLint from "./url--type.mjs";
|
|
6
6
|
import typeTypeLint from "./type--type.mjs";
|
|
7
|
-
import
|
|
7
|
+
import typeEquals10Lint from "./type--equals-1-0.mjs";
|
|
8
|
+
import typeEquals11Lint from "./type--equals-1-1.mjs";
|
|
8
9
|
import allowedFieldsLint from "./allowed-fields.mjs";
|
|
9
|
-
const lints = [nameRequiredLint, nameTypeLint, namePatternLint, urlRequiredLint, urlTypeLint, typeTypeLint,
|
|
10
|
+
const lints = [nameRequiredLint, nameTypeLint, namePatternLint, urlRequiredLint, urlTypeLint, typeTypeLint, typeEquals10Lint, typeEquals11Lint, allowedFieldsLint];
|
|
10
11
|
export default lints;
|
|
@@ -11,8 +11,8 @@ var _targetSpecs = require("../../target-specs.cjs");
|
|
|
11
11
|
const namePatternLint = {
|
|
12
12
|
code: _codes.default.ARAZZO_SOURCE_DESCRIPTION_FIELD_NAME_PATTERN,
|
|
13
13
|
source: 'apilint',
|
|
14
|
-
message: 'name
|
|
15
|
-
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.
|
|
14
|
+
message: 'name 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 namePatternLint = {
|
|
5
5
|
code: ApilintCodes.ARAZZO_SOURCE_DESCRIPTION_FIELD_NAME_PATTERN,
|
|
6
6
|
source: 'apilint',
|
|
7
|
-
message: 'name
|
|
8
|
-
severity: DiagnosticSeverity.
|
|
7
|
+
message: 'name 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',
|
|
@@ -8,7 +8,7 @@ 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
|
-
const
|
|
11
|
+
const typeEquals10Lint = {
|
|
12
12
|
code: _codes.default.ARAZZO_SOURCE_DESCRIPTION_FIELD_TYPE_EQUALS,
|
|
13
13
|
source: 'apilint',
|
|
14
14
|
message: "type must be one of: 'openapi', 'arazzo'",
|
|
@@ -18,6 +18,6 @@ const typeEqualsLint = {
|
|
|
18
18
|
marker: 'value',
|
|
19
19
|
target: 'type',
|
|
20
20
|
data: {},
|
|
21
|
-
targetSpecs: [..._targetSpecs.
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo10]
|
|
22
22
|
};
|
|
23
|
-
var _default = exports.default =
|
|
23
|
+
var _default = exports.default = typeEquals10Lint;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
2
2
|
import ApilintCodes from "../../../codes.mjs";
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
3
|
+
import { Arazzo10 } from "../../target-specs.mjs";
|
|
4
|
+
const typeEquals10Lint = {
|
|
5
5
|
code: ApilintCodes.ARAZZO_SOURCE_DESCRIPTION_FIELD_TYPE_EQUALS,
|
|
6
6
|
source: 'apilint',
|
|
7
7
|
message: "type must be one of: 'openapi', 'arazzo'",
|
|
@@ -11,6 +11,6 @@ const typeEqualsLint = {
|
|
|
11
11
|
marker: 'value',
|
|
12
12
|
target: 'type',
|
|
13
13
|
data: {},
|
|
14
|
-
targetSpecs: [...
|
|
14
|
+
targetSpecs: [...Arazzo10]
|
|
15
15
|
};
|
|
16
|
-
export default
|
|
16
|
+
export default typeEquals10Lint;
|
|
@@ -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 typeEquals11Lint = {
|
|
12
|
+
code: _codes.default.ARAZZO_SOURCE_DESCRIPTION_FIELD_TYPE_EQUALS,
|
|
13
|
+
source: 'apilint',
|
|
14
|
+
message: "type must be one of: 'openapi', 'arazzo', 'asyncapi'",
|
|
15
|
+
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
16
|
+
linterFunction: 'apilintValueOrArray',
|
|
17
|
+
linterParams: [['openapi', 'arazzo', 'asyncapi']],
|
|
18
|
+
marker: 'value',
|
|
19
|
+
target: 'type',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = typeEquals11Lint;
|
|
@@ -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 typeEquals11Lint = {
|
|
5
|
+
code: ApilintCodes.ARAZZO_SOURCE_DESCRIPTION_FIELD_TYPE_EQUALS,
|
|
6
|
+
source: 'apilint',
|
|
7
|
+
message: "type must be one of: 'openapi', 'arazzo', 'asyncapi'",
|
|
8
|
+
severity: DiagnosticSeverity.Error,
|
|
9
|
+
linterFunction: 'apilintValueOrArray',
|
|
10
|
+
linterParams: [['openapi', 'arazzo', 'asyncapi']],
|
|
11
|
+
marker: 'value',
|
|
12
|
+
target: 'type',
|
|
13
|
+
data: {},
|
|
14
|
+
targetSpecs: [...Arazzo11]
|
|
15
|
+
};
|
|
16
|
+
export default typeEquals11Lint;
|
|
@@ -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;
|
package/src/config/{ads/info/lint/description--type.cjs → arazzo/step/lint/action--type.cjs}
RENAMED
|
@@ -7,15 +7,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
|
|
9
9
|
var _codes = _interopRequireDefault(require("../../../codes.cjs"));
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
var _targetSpecs = require("../../target-specs.cjs");
|
|
11
|
+
const actionTypeLint = {
|
|
12
|
+
code: _codes.default.ARAZZO_STEP_FIELD_ACTION_TYPE,
|
|
12
13
|
source: 'apilint',
|
|
13
|
-
message: '
|
|
14
|
+
message: 'action must be a string',
|
|
14
15
|
severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error,
|
|
15
16
|
linterFunction: 'apilintType',
|
|
16
17
|
linterParams: ['string'],
|
|
17
18
|
marker: 'value',
|
|
18
|
-
target: '
|
|
19
|
-
data: {}
|
|
19
|
+
target: 'action',
|
|
20
|
+
data: {},
|
|
21
|
+
targetSpecs: [..._targetSpecs.Arazzo11]
|
|
20
22
|
};
|
|
21
|
-
var _default = exports.default =
|
|
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;
|