From 211766312e5bbfa21547341ae15e56a1c3398948 Mon Sep 17 00:00:00 2001 From: Oliwia Rogala Date: Thu, 12 Mar 2026 13:59:42 +0100 Subject: [PATCH 1/7] feat: update SQS Bindings Co-Authored-By: Claude Sonnet 4.6 --- .../sqs/channel-binding/completion/0-2-0.ts | 50 + .../sqs/channel-binding/completion/0-3-0.ts | 50 + .../sqs/channel-binding/completion/index.ts | 46 + .../sqs/channel-binding/completion/latest.ts | 48 + .../sqs/channel-binding/documentation.ts | 2 +- .../lint/0-2-0/allowed-fields.ts | 23 + .../lint/0-2-0/dead-letter-queue--type.ts | 25 + .../sqs/channel-binding/lint/0-2-0/index.ts | 7 + .../channel-binding/lint/0-2-0/queue--type.ts | 25 + .../lint/0-3-0/allowed-fields.ts | 23 + .../lint/0-3-0/dead-letter-queue--type.ts | 25 + .../sqs/channel-binding/lint/0-3-0/index.ts | 7 + .../channel-binding/lint/0-3-0/queue--type.ts | 25 + .../lint/binding-version--type.ts | 18 + .../sqs/channel-binding/lint/index.ts | 11 +- .../lint/latest/allowed-fields.ts | 4 +- .../lint/latest/dead-letter-queue--type.ts | 24 + .../sqs/channel-binding/lint/latest/index.ts | 4 +- .../lint/latest/queue--type.ts | 24 + .../bindings/sqs/channel-binding/meta.ts | 2 + .../sqs/message-binding/documentation.ts | 2 +- .../lint/0-2-0/allowed-fields.ts | 23 + .../sqs/message-binding/lint/0-2-0/index.ts | 5 + .../lint/0-3-0/allowed-fields.ts | 23 + .../sqs/message-binding/lint/0-3-0/index.ts | 5 + .../sqs/message-binding/lint/index.ts | 9 +- .../sqs/operation-binding/completion/0-2-0.ts | 30 + .../sqs/operation-binding/completion/0-3-0.ts | 30 + .../sqs/operation-binding/completion/index.ts | 46 + .../operation-binding/completion/latest.ts | 29 + .../sqs/operation-binding/documentation.ts | 2 +- .../lint/0-2-0/allowed-fields.ts | 23 + .../sqs/operation-binding/lint/0-2-0/index.ts | 6 + .../lint/0-2-0/queues--type.ts | 25 + .../lint/0-3-0/allowed-fields.ts | 23 + .../sqs/operation-binding/lint/0-3-0/index.ts | 6 + .../lint/0-3-0/queues--type.ts | 25 + .../lint/binding-version--type.ts | 18 + .../sqs/operation-binding/lint/index.ts | 11 +- .../lint/latest/allowed-fields.ts | 4 +- .../operation-binding/lint/latest/index.ts | 3 +- .../lint/latest/queues--type.ts | 24 + .../bindings/sqs/operation-binding/meta.ts | 2 + .../lint/0-1-0/allowed-fields.ts | 4 +- .../lint/0-2-0/allowed-fields.ts | 23 + .../sqs/server-binding/lint/0-2-0/index.ts | 5 + .../lint/0-3-0/allowed-fields.ts | 23 + .../sqs/server-binding/lint/0-3-0/index.ts | 5 + .../bindings/sqs/server-binding/lint/index.ts | 9 +- .../lint/latest/allowed-fields.ts | 4 +- packages/apidom-ls/src/config/codes.ts | 8 + .../apidom-ls/test/asyncapi-sqs-bindings.ts | 1098 +++++++++++++++++ ...-channel-binding-allowed-fields-0-1-0.yaml | 11 + ...-channel-binding-allowed-fields-0-2-0.yaml | 11 + ...-channel-binding-allowed-fields-0-3-0.yaml | 11 + ...channel-binding-allowed-fields-latest.yaml | 10 + ...channel-binding-binding-version--type.yaml | 10 + ...binding-dead-letter-queue--type-0-2-0.yaml | 14 + ...binding-dead-letter-queue--type-0-3-0.yaml | 14 + ...inding-dead-letter-queue--type-latest.yaml | 13 + ...sqs-channel-binding-queue--type-0-2-0.yaml | 11 + ...sqs-channel-binding-queue--type-0-3-0.yaml | 11 + ...qs-channel-binding-queue--type-latest.yaml | 10 + ...-message-binding-allowed-fields-0-1-0.yaml | 13 + ...-message-binding-allowed-fields-0-2-0.yaml | 13 + ...-message-binding-allowed-fields-0-3-0.yaml | 13 + ...message-binding-allowed-fields-latest.yaml | 12 + ...peration-binding-allowed-fields-0-1-0.yaml | 16 + ...peration-binding-allowed-fields-0-2-0.yaml | 16 + ...peration-binding-allowed-fields-0-3-0.yaml | 16 + ...eration-binding-allowed-fields-latest.yaml | 15 + ...eration-binding-binding-version--type.yaml | 15 + ...-operation-binding-queues--type-0-2-0.yaml | 16 + ...-operation-binding-queues--type-0-3-0.yaml | 16 + ...operation-binding-queues--type-latest.yaml | 15 + ...s-server-binding-allowed-fields-0-1-0.yaml | 12 + ...s-server-binding-allowed-fields-0-2-0.yaml | 12 + ...s-server-binding-allowed-fields-0-3-0.yaml | 12 + ...-server-binding-allowed-fields-latest.yaml | 11 + .../bindings/sqs/SqsChannelBinding.ts | 26 +- .../bindings/sqs/SqsOperationBinding.ts | 24 +- .../src/refractor/specification.ts | 19 + .../__snapshots__/index.ts.snap | 22 +- .../bindings/sqs/SqsChannelBinding/index.ts | 11 +- .../__snapshots__/index.ts.snap | 14 +- .../bindings/sqs/SqsOperationBinding/index.ts | 9 +- .../src/refractor/specification.ts | 19 + .../__snapshots__/index.ts.snap | 22 +- .../bindings/sqs/SqsChannelBinding/index.ts | 11 +- .../__snapshots__/index.ts.snap | 14 +- .../bindings/sqs/SqsOperationBinding/index.ts | 9 +- 91 files changed, 2518 insertions(+), 27 deletions(-) create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/allowed-fields.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/dead-letter-queue--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/index.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/queue--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/allowed-fields.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/dead-letter-queue--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/index.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/queue--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/binding-version--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/dead-letter-queue--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/queue--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-2-0/allowed-fields.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-2-0/index.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-3-0/allowed-fields.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-3-0/index.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/allowed-fields.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/index.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/queues--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/allowed-fields.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/index.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/queues--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/binding-version--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/queues--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-2-0/allowed-fields.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-2-0/index.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-3-0/allowed-fields.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-3-0/index.ts create mode 100644 packages/apidom-ls/test/asyncapi-sqs-bindings.ts create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-1-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-2-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-3-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-latest.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-binding-version--type.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-2-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-3-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-latest.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-2-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-3-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-latest.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-1-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-2-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-3-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-latest.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-1-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-2-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-3-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-latest.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-binding-version--type.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-2-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-3-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-latest.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-1-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-2-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-3-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-latest.yaml diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts new file mode 100644 index 0000000000..7946d810b0 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts @@ -0,0 +1,50 @@ +import { + ApidomCompletionItem, + CompletionFormat, + CompletionType, +} from '../../../../../../apidom-language-types.ts'; + +const completion: ApidomCompletionItem[] = [ + { + label: 'queue', + insertText: 'queue', + kind: 14, + format: CompletionFormat.OBJECT, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used as the channel.', + }, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.2.0']], + }, + ], + }, + { + label: 'deadLetterQueue', + insertText: 'deadLetterQueue', + kind: 14, + format: CompletionFormat.OBJECT, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used for un-processable messages.', + }, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.2.0']], + }, + ], + }, +]; + +export default completion; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts new file mode 100644 index 0000000000..ab25695c2d --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts @@ -0,0 +1,50 @@ +import { + ApidomCompletionItem, + CompletionFormat, + CompletionType, +} from '../../../../../../apidom-language-types.ts'; + +const completion: ApidomCompletionItem[] = [ + { + label: 'queue', + insertText: 'queue', + kind: 14, + format: CompletionFormat.OBJECT, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used as the channel.', + }, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.3.0']], + }, + ], + }, + { + label: 'deadLetterQueue', + insertText: 'deadLetterQueue', + kind: 14, + format: CompletionFormat.OBJECT, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used for un-processable messages.', + }, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.3.0']], + }, + ], + }, +]; + +export default completion; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts new file mode 100644 index 0000000000..a9954b2611 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts @@ -0,0 +1,46 @@ +import completion0_2_0Items from './0-2-0.ts'; +import completion0_3_0Items from './0-3-0.ts'; +import completionLatestItems from './latest.ts'; +import { + ApidomCompletionItem, + CompletionFormat, + CompletionType, +} from '../../../../../../apidom-language-types.ts'; + +const completion: ApidomCompletionItem[] = [ + ...completion0_2_0Items, + ...completion0_3_0Items, + ...completionLatestItems, + { + label: 'bindingVersion', + insertText: 'bindingVersion', + kind: 14, + format: CompletionFormat.QUOTED, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: '**Optional**, defaults to `latest`. The version of this binding.', + }, + }, + { + target: 'bindingVersion', + label: '0.2.0', + insertText: '0.2.0', + kind: 12, + format: CompletionFormat.QUOTED_FORCED, + type: CompletionType.VALUE, + insertTextFormat: 2, + }, + { + target: 'bindingVersion', + label: '0.3.0', + insertText: '0.3.0', + kind: 12, + format: CompletionFormat.QUOTED_FORCED, + type: CompletionType.VALUE, + insertTextFormat: 2, + }, +]; + +export default completion; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts new file mode 100644 index 0000000000..a787c77ee4 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts @@ -0,0 +1,48 @@ +import { + ApidomCompletionItem, + CompletionFormat, + CompletionType, +} from '../../../../../../apidom-language-types.ts'; + +const completion: ApidomCompletionItem[] = [ + { + label: 'queue', + insertText: 'queue', + kind: 14, + format: CompletionFormat.OBJECT, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used as the channel.', + }, + conditions: [ + { + function: 'missingField', + params: ['bindingVersion'], + }, + ], + }, + { + label: 'deadLetterQueue', + insertText: 'deadLetterQueue', + kind: 14, + format: CompletionFormat.OBJECT, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used for un-processable messages.', + }, + conditions: [ + { + function: 'missingField', + params: ['bindingVersion'], + }, + ], + }, +]; + +export default completion; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/documentation.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/documentation.ts index a7558fe525..2cca2e812b 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/documentation.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/documentation.ts @@ -1,6 +1,6 @@ const documentation = [ { - docs: '#### [Channel Binding Object](https://github.com/asyncapi/bindings/blob/master/sqs#channel)\n\nThis object MUST NOT contain any properties. Its name is reserved for future use.', + docs: '#### [Channel Binding Object](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#channel-binding-object)\n\n##### Fixed Fields\n\nField Name | Type | Description\n---|:---:|---\nqueue | [Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue) | **Required**. A definition of the queue that will be used as the channel.\ndeadLetterQueue | [Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue) | **Optional**. A definition of the queue that will be used for un-processable messages.\nbindingVersion | string | **Optional**, defaults to `latest`. The version of this binding.', }, ]; export default documentation; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/allowed-fields.ts new file mode 100644 index 0000000000..310ba9c3d8 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/allowed-fields.ts @@ -0,0 +1,23 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const allowedFieldsLint: LinterMeta = { + code: ApilintCodes.NOT_ALLOWED_FIELDS, + source: 'apilint', + message: 'Object includes not allowed fields.', + severity: DiagnosticSeverity.Error, + linterFunction: 'allowedFields', + linterParams: [['queue', 'deadLetterQueue', 'bindingVersion']], + marker: 'key', + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.2.0']], + }, + ], +}; + +export default allowedFieldsLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/dead-letter-queue--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/dead-letter-queue--type.ts new file mode 100644 index 0000000000..c8de7badac --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/dead-letter-queue--type.ts @@ -0,0 +1,25 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const deadLetterQueueTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_DEAD_LETTER_QUEUE_TYPE, + source: 'apilint', + message: "'deadLetterQueue' value must be an object", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['object'], + marker: 'value', + target: 'deadLetterQueue', + data: {}, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.2.0']], + }, + ], +}; + +export default deadLetterQueueTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/index.ts new file mode 100644 index 0000000000..fb8c020f87 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/index.ts @@ -0,0 +1,7 @@ +import allowedFieldsLint from './allowed-fields.ts'; +import queueTypeLint from './queue--type.ts'; +import deadLetterQueueTypeLint from './dead-letter-queue--type.ts'; + +const lints = [queueTypeLint, deadLetterQueueTypeLint, allowedFieldsLint]; + +export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/queue--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/queue--type.ts new file mode 100644 index 0000000000..be6a1c5a34 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-2-0/queue--type.ts @@ -0,0 +1,25 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const queueTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_QUEUE_TYPE, + source: 'apilint', + message: "'queue' value must be an object", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['object'], + marker: 'value', + target: 'queue', + data: {}, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.2.0']], + }, + ], +}; + +export default queueTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/allowed-fields.ts new file mode 100644 index 0000000000..21a76507cc --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/allowed-fields.ts @@ -0,0 +1,23 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const allowedFieldsLint: LinterMeta = { + code: ApilintCodes.NOT_ALLOWED_FIELDS, + source: 'apilint', + message: 'Object includes not allowed fields.', + severity: DiagnosticSeverity.Error, + linterFunction: 'allowedFields', + linterParams: [['queue', 'deadLetterQueue', 'bindingVersion']], + marker: 'key', + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.3.0']], + }, + ], +}; + +export default allowedFieldsLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/dead-letter-queue--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/dead-letter-queue--type.ts new file mode 100644 index 0000000000..031cf52062 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/dead-letter-queue--type.ts @@ -0,0 +1,25 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const deadLetterQueueTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_DEAD_LETTER_QUEUE_TYPE, + source: 'apilint', + message: "'deadLetterQueue' value must be an object", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['object'], + marker: 'value', + target: 'deadLetterQueue', + data: {}, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.3.0']], + }, + ], +}; + +export default deadLetterQueueTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/index.ts new file mode 100644 index 0000000000..fb8c020f87 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/index.ts @@ -0,0 +1,7 @@ +import allowedFieldsLint from './allowed-fields.ts'; +import queueTypeLint from './queue--type.ts'; +import deadLetterQueueTypeLint from './dead-letter-queue--type.ts'; + +const lints = [queueTypeLint, deadLetterQueueTypeLint, allowedFieldsLint]; + +export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/queue--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/queue--type.ts new file mode 100644 index 0000000000..75405bd43d --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-3-0/queue--type.ts @@ -0,0 +1,25 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const queueTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_QUEUE_TYPE, + source: 'apilint', + message: "'queue' value must be an object", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['object'], + marker: 'value', + target: 'queue', + data: {}, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.3.0']], + }, + ], +}; + +export default queueTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/binding-version--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/binding-version--type.ts new file mode 100644 index 0000000000..b23b11a7ea --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/binding-version--type.ts @@ -0,0 +1,18 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../apidom-language-types.ts'; + +const bindingVersionTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_BINDING_VERSION_TYPE, + source: 'apilint', + message: "'bindingVersion' value must be a string", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['string'], + marker: 'value', + target: 'bindingVersion', + data: {}, +}; + +export default bindingVersionTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/index.ts index 91fc68adb1..eec31d1db9 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/index.ts @@ -1,6 +1,15 @@ import channelBinding0_1_0Lints from './0-1-0/index.ts'; +import channelBinding0_2_0Lints from './0-2-0/index.ts'; +import channelBinding0_3_0Lints from './0-3-0/index.ts'; import channelBindingLatestLints from './latest/index.ts'; +import bindingVersionTypeLint from './binding-version--type.ts'; -const lints = [...channelBinding0_1_0Lints, ...channelBindingLatestLints]; +const lints = [ + ...channelBinding0_1_0Lints, + ...channelBinding0_2_0Lints, + ...channelBinding0_3_0Lints, + ...channelBindingLatestLints, + bindingVersionTypeLint, +]; export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/allowed-fields.ts index 1d1ec3b58b..7707b5f197 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/allowed-fields.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/allowed-fields.ts @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; const allowedFieldsLint: LinterMeta = { code: ApilintCodes.NOT_ALLOWED_FIELDS, source: 'apilint', - message: 'This object MUST NOT contain any properties. Its name is reserved for future use.', + message: 'Object includes not allowed fields.', severity: DiagnosticSeverity.Error, linterFunction: 'allowedFields', - linterParams: [[]], + linterParams: [['queue', 'deadLetterQueue', 'bindingVersion']], marker: 'key', conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/dead-letter-queue--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/dead-letter-queue--type.ts new file mode 100644 index 0000000000..9d66f310b9 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/dead-letter-queue--type.ts @@ -0,0 +1,24 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const deadLetterQueueTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_DEAD_LETTER_QUEUE_TYPE, + source: 'apilint', + message: "'deadLetterQueue' value must be an object", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['object'], + marker: 'value', + target: 'deadLetterQueue', + data: {}, + conditions: [ + { + function: 'missingField', + params: ['bindingVersion'], + }, + ], +}; + +export default deadLetterQueueTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/index.ts index 47f7d48761..fb8c020f87 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/index.ts @@ -1,5 +1,7 @@ import allowedFieldsLint from './allowed-fields.ts'; +import queueTypeLint from './queue--type.ts'; +import deadLetterQueueTypeLint from './dead-letter-queue--type.ts'; -const lints = [allowedFieldsLint]; +const lints = [queueTypeLint, deadLetterQueueTypeLint, allowedFieldsLint]; export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/queue--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/queue--type.ts new file mode 100644 index 0000000000..b30bef4c6c --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/latest/queue--type.ts @@ -0,0 +1,24 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const queueTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_QUEUE_TYPE, + source: 'apilint', + message: "'queue' value must be an object", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['object'], + marker: 'value', + target: 'queue', + data: {}, + conditions: [ + { + function: 'missingField', + params: ['bindingVersion'], + }, + ], +}; + +export default queueTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/meta.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/meta.ts index 4bcdc1ce33..074f510525 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/meta.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/meta.ts @@ -1,9 +1,11 @@ import lint from './lint/index.ts'; +import completion from './completion/index.ts'; import documentation from './documentation.ts'; import { FormatMeta } from '../../../../../apidom-language-types.ts'; const meta: FormatMeta = { lint, + completion, documentation, }; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/documentation.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/documentation.ts index d2997ab1e4..08f849d6ad 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/documentation.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/documentation.ts @@ -1,6 +1,6 @@ const documentation = [ { - docs: '#### [Message Binding Object(https://github.com/asyncapi/bindings/blob/master/sqs/README.md#message-binding-object)\n\nThis object MUST NOT contain any properties. Its name is reserved for future use.', + docs: '#### [Message Binding Object](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#message-binding-object)\n\nThis object MUST NOT contain any properties. Its name is reserved for future use.', }, ]; export default documentation; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-2-0/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-2-0/allowed-fields.ts new file mode 100644 index 0000000000..7cec7d6301 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-2-0/allowed-fields.ts @@ -0,0 +1,23 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const allowedFieldsLint: LinterMeta = { + code: ApilintCodes.NOT_ALLOWED_FIELDS, + source: 'apilint', + message: 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: DiagnosticSeverity.Error, + linterFunction: 'allowedFields', + linterParams: [[]], + marker: 'key', + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.2.0']], + }, + ], +}; + +export default allowedFieldsLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-2-0/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-2-0/index.ts new file mode 100644 index 0000000000..47f7d48761 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-2-0/index.ts @@ -0,0 +1,5 @@ +import allowedFieldsLint from './allowed-fields.ts'; + +const lints = [allowedFieldsLint]; + +export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-3-0/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-3-0/allowed-fields.ts new file mode 100644 index 0000000000..021dca1b84 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-3-0/allowed-fields.ts @@ -0,0 +1,23 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const allowedFieldsLint: LinterMeta = { + code: ApilintCodes.NOT_ALLOWED_FIELDS, + source: 'apilint', + message: 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: DiagnosticSeverity.Error, + linterFunction: 'allowedFields', + linterParams: [[]], + marker: 'key', + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.3.0']], + }, + ], +}; + +export default allowedFieldsLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-3-0/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-3-0/index.ts new file mode 100644 index 0000000000..47f7d48761 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/0-3-0/index.ts @@ -0,0 +1,5 @@ +import allowedFieldsLint from './allowed-fields.ts'; + +const lints = [allowedFieldsLint]; + +export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/index.ts index aea338011a..b40a6d12b0 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/message-binding/lint/index.ts @@ -1,6 +1,13 @@ import messageBinding0_1_0Lints from './0-1-0/index.ts'; +import messageBinding0_2_0Lints from './0-2-0/index.ts'; +import messageBinding0_3_0Lints from './0-3-0/index.ts'; import messageBindingLatestLints from './latest/index.ts'; -const lints = [...messageBinding0_1_0Lints, ...messageBindingLatestLints]; +const lints = [ + ...messageBinding0_1_0Lints, + ...messageBinding0_2_0Lints, + ...messageBinding0_3_0Lints, + ...messageBindingLatestLints, +]; export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts new file mode 100644 index 0000000000..760a838a5e --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts @@ -0,0 +1,30 @@ +import { + ApidomCompletionItem, + CompletionFormat, + CompletionType, +} from '../../../../../../apidom-language-types.ts'; + +const completion: ApidomCompletionItem[] = [ + { + label: 'queues', + insertText: 'queues', + kind: 14, + format: CompletionFormat.ARRAY, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\nQueue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', + }, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.2.0']], + }, + ], + }, +]; + +export default completion; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts new file mode 100644 index 0000000000..a3bad0f5cf --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts @@ -0,0 +1,30 @@ +import { + ApidomCompletionItem, + CompletionFormat, + CompletionType, +} from '../../../../../../apidom-language-types.ts'; + +const completion: ApidomCompletionItem[] = [ + { + label: 'queues', + insertText: 'queues', + kind: 14, + format: CompletionFormat.ARRAY, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\nQueue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', + }, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.3.0']], + }, + ], + }, +]; + +export default completion; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts new file mode 100644 index 0000000000..a9954b2611 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts @@ -0,0 +1,46 @@ +import completion0_2_0Items from './0-2-0.ts'; +import completion0_3_0Items from './0-3-0.ts'; +import completionLatestItems from './latest.ts'; +import { + ApidomCompletionItem, + CompletionFormat, + CompletionType, +} from '../../../../../../apidom-language-types.ts'; + +const completion: ApidomCompletionItem[] = [ + ...completion0_2_0Items, + ...completion0_3_0Items, + ...completionLatestItems, + { + label: 'bindingVersion', + insertText: 'bindingVersion', + kind: 14, + format: CompletionFormat.QUOTED, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: '**Optional**, defaults to `latest`. The version of this binding.', + }, + }, + { + target: 'bindingVersion', + label: '0.2.0', + insertText: '0.2.0', + kind: 12, + format: CompletionFormat.QUOTED_FORCED, + type: CompletionType.VALUE, + insertTextFormat: 2, + }, + { + target: 'bindingVersion', + label: '0.3.0', + insertText: '0.3.0', + kind: 12, + format: CompletionFormat.QUOTED_FORCED, + type: CompletionType.VALUE, + insertTextFormat: 2, + }, +]; + +export default completion; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts new file mode 100644 index 0000000000..f1212b7c4d --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts @@ -0,0 +1,29 @@ +import { + ApidomCompletionItem, + CompletionFormat, + CompletionType, +} from '../../../../../../apidom-language-types.ts'; + +const completion: ApidomCompletionItem[] = [ + { + label: 'queues', + insertText: 'queues', + kind: 14, + format: CompletionFormat.ARRAY, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\nQueue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', + }, + conditions: [ + { + function: 'missingField', + params: ['bindingVersion'], + }, + ], + }, +]; + +export default completion; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/documentation.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/documentation.ts index f2ee77aa48..c5cb484b8c 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/documentation.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/documentation.ts @@ -1,6 +1,6 @@ const documentation = [ { - docs: '#### [Operation Binding Object](https://github.com/asyncapi/bindings/tree/master/sqs#operation)\n\nThis object MUST NOT contain any properties. Its name is reserved for future use.', + docs: '#### [Operation Binding Object](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#operation-binding-object)\n\n##### Fixed Fields\n\nField Name | Type | Description\n---|:---:|---\nqueues | [[Queue]](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue) | **Required**. Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.\nbindingVersion | string | **Optional**, defaults to `latest`. The version of this binding.', }, ]; export default documentation; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/allowed-fields.ts new file mode 100644 index 0000000000..b3f49a7fae --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/allowed-fields.ts @@ -0,0 +1,23 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const allowedFieldsLint: LinterMeta = { + code: ApilintCodes.NOT_ALLOWED_FIELDS, + source: 'apilint', + message: 'Object includes not allowed fields.', + severity: DiagnosticSeverity.Error, + linterFunction: 'allowedFields', + linterParams: [['queues', 'bindingVersion']], + marker: 'key', + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.2.0']], + }, + ], +}; + +export default allowedFieldsLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/index.ts new file mode 100644 index 0000000000..35d0f6b7bf --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/index.ts @@ -0,0 +1,6 @@ +import allowedFieldsLint from './allowed-fields.ts'; +import queuesTypeLint from './queues--type.ts'; + +const lints = [queuesTypeLint, allowedFieldsLint]; + +export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/queues--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/queues--type.ts new file mode 100644 index 0000000000..62bb3ce794 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-2-0/queues--type.ts @@ -0,0 +1,25 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const queuesTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_OPERATION_BINDING_FIELD_QUEUES_TYPE, + source: 'apilint', + message: "'queues' value must be an array", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['array'], + marker: 'value', + target: 'queues', + data: {}, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.2.0']], + }, + ], +}; + +export default queuesTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/allowed-fields.ts new file mode 100644 index 0000000000..ae29e20da8 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/allowed-fields.ts @@ -0,0 +1,23 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const allowedFieldsLint: LinterMeta = { + code: ApilintCodes.NOT_ALLOWED_FIELDS, + source: 'apilint', + message: 'Object includes not allowed fields.', + severity: DiagnosticSeverity.Error, + linterFunction: 'allowedFields', + linterParams: [['queues', 'bindingVersion']], + marker: 'key', + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.3.0']], + }, + ], +}; + +export default allowedFieldsLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/index.ts new file mode 100644 index 0000000000..35d0f6b7bf --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/index.ts @@ -0,0 +1,6 @@ +import allowedFieldsLint from './allowed-fields.ts'; +import queuesTypeLint from './queues--type.ts'; + +const lints = [queuesTypeLint, allowedFieldsLint]; + +export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/queues--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/queues--type.ts new file mode 100644 index 0000000000..befb387ad7 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-3-0/queues--type.ts @@ -0,0 +1,25 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const queuesTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_OPERATION_BINDING_FIELD_QUEUES_TYPE, + source: 'apilint', + message: "'queues' value must be an array", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['array'], + marker: 'value', + target: 'queues', + data: {}, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.3.0']], + }, + ], +}; + +export default queuesTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/binding-version--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/binding-version--type.ts new file mode 100644 index 0000000000..3ce45b90e1 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/binding-version--type.ts @@ -0,0 +1,18 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../apidom-language-types.ts'; + +const bindingVersionTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_OPERATION_BINDING_FIELD_BINDING_VERSION_TYPE, + source: 'apilint', + message: "'bindingVersion' value must be a string", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['string'], + marker: 'value', + target: 'bindingVersion', + data: {}, +}; + +export default bindingVersionTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/index.ts index dd187fd0b6..10556032ee 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/index.ts @@ -1,6 +1,15 @@ import operationBinding0_1_0Lints from './0-1-0/index.ts'; +import operationBinding0_2_0Lints from './0-2-0/index.ts'; +import operationBinding0_3_0Lints from './0-3-0/index.ts'; import operationBindingLatestLints from './latest/index.ts'; +import bindingVersionTypeLint from './binding-version--type.ts'; -const lints = [...operationBinding0_1_0Lints, ...operationBindingLatestLints]; +const lints = [ + ...operationBinding0_1_0Lints, + ...operationBinding0_2_0Lints, + ...operationBinding0_3_0Lints, + ...operationBindingLatestLints, + bindingVersionTypeLint, +]; export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/allowed-fields.ts index 1d1ec3b58b..82e18aef6e 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/allowed-fields.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/allowed-fields.ts @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; const allowedFieldsLint: LinterMeta = { code: ApilintCodes.NOT_ALLOWED_FIELDS, source: 'apilint', - message: 'This object MUST NOT contain any properties. Its name is reserved for future use.', + message: 'Object includes not allowed fields.', severity: DiagnosticSeverity.Error, linterFunction: 'allowedFields', - linterParams: [[]], + linterParams: [['queues', 'bindingVersion']], marker: 'key', conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/index.ts index 47f7d48761..35d0f6b7bf 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/index.ts @@ -1,5 +1,6 @@ import allowedFieldsLint from './allowed-fields.ts'; +import queuesTypeLint from './queues--type.ts'; -const lints = [allowedFieldsLint]; +const lints = [queuesTypeLint, allowedFieldsLint]; export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/queues--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/queues--type.ts new file mode 100644 index 0000000000..8c07dccc6c --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/latest/queues--type.ts @@ -0,0 +1,24 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const queuesTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_OPERATION_BINDING_FIELD_QUEUES_TYPE, + source: 'apilint', + message: "'queues' value must be an array", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['array'], + marker: 'value', + target: 'queues', + data: {}, + conditions: [ + { + function: 'missingField', + params: ['bindingVersion'], + }, + ], +}; + +export default queuesTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/meta.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/meta.ts index 4bcdc1ce33..074f510525 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/meta.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/meta.ts @@ -1,9 +1,11 @@ import lint from './lint/index.ts'; +import completion from './completion/index.ts'; import documentation from './documentation.ts'; import { FormatMeta } from '../../../../../apidom-language-types.ts'; const meta: FormatMeta = { lint, + completion, documentation, }; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-1-0/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-1-0/allowed-fields.ts index 709121fad1..1304f42fb9 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-1-0/allowed-fields.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-1-0/allowed-fields.ts @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; const allowedFieldsLint: LinterMeta = { code: ApilintCodes.NOT_ALLOWED_FIELDS, source: 'apilint', - message: 'Object includes not allowed fields.', + message: 'This object MUST NOT contain any properties. Its name is reserved for future use.', severity: DiagnosticSeverity.Error, linterFunction: 'allowedFields', - linterParams: [['contentEncoding', 'messageType', 'bindingVersion']], + linterParams: [[]], marker: 'key', conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-2-0/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-2-0/allowed-fields.ts new file mode 100644 index 0000000000..7cec7d6301 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-2-0/allowed-fields.ts @@ -0,0 +1,23 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const allowedFieldsLint: LinterMeta = { + code: ApilintCodes.NOT_ALLOWED_FIELDS, + source: 'apilint', + message: 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: DiagnosticSeverity.Error, + linterFunction: 'allowedFields', + linterParams: [[]], + marker: 'key', + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.2.0']], + }, + ], +}; + +export default allowedFieldsLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-2-0/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-2-0/index.ts new file mode 100644 index 0000000000..47f7d48761 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-2-0/index.ts @@ -0,0 +1,5 @@ +import allowedFieldsLint from './allowed-fields.ts'; + +const lints = [allowedFieldsLint]; + +export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-3-0/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-3-0/allowed-fields.ts new file mode 100644 index 0000000000..021dca1b84 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-3-0/allowed-fields.ts @@ -0,0 +1,23 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const allowedFieldsLint: LinterMeta = { + code: ApilintCodes.NOT_ALLOWED_FIELDS, + source: 'apilint', + message: 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: DiagnosticSeverity.Error, + linterFunction: 'allowedFields', + linterParams: [[]], + marker: 'key', + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.3.0']], + }, + ], +}; + +export default allowedFieldsLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-3-0/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-3-0/index.ts new file mode 100644 index 0000000000..47f7d48761 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/0-3-0/index.ts @@ -0,0 +1,5 @@ +import allowedFieldsLint from './allowed-fields.ts'; + +const lints = [allowedFieldsLint]; + +export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/index.ts index 0bdc5898c0..285c8158cd 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/index.ts @@ -1,6 +1,13 @@ import serverBinding0_1_0Lints from './0-1-0/index.ts'; +import serverBinding0_2_0Lints from './0-2-0/index.ts'; +import serverBinding0_3_0Lints from './0-3-0/index.ts'; import serverBindingLatestLints from './latest/index.ts'; -const lints = [...serverBinding0_1_0Lints, ...serverBindingLatestLints]; +const lints = [ + ...serverBinding0_1_0Lints, + ...serverBinding0_2_0Lints, + ...serverBinding0_3_0Lints, + ...serverBindingLatestLints, +]; export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/latest/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/latest/allowed-fields.ts index 61d64a9ebb..1d1ec3b58b 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/latest/allowed-fields.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/server-binding/lint/latest/allowed-fields.ts @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; const allowedFieldsLint: LinterMeta = { code: ApilintCodes.NOT_ALLOWED_FIELDS, source: 'apilint', - message: 'Object includes not allowed fields.', + message: 'This object MUST NOT contain any properties. Its name is reserved for future use.', severity: DiagnosticSeverity.Error, linterFunction: 'allowedFields', - linterParams: [['contentEncoding', 'messageType', 'bindingVersion']], + linterParams: [[]], marker: 'key', conditions: [ { diff --git a/packages/apidom-ls/src/config/codes.ts b/packages/apidom-ls/src/config/codes.ts index 3675dd0544..4100748936 100644 --- a/packages/apidom-ls/src/config/codes.ts +++ b/packages/apidom-ls/src/config/codes.ts @@ -547,8 +547,16 @@ enum ApilintCodes { ASYNCAPI2_SOLACE_SERVER_BINDING_FIELD_BINDING_VERSION_TYPE = 820200, ASYNCAPI2_SQS_CHANNEL_BINDING = 830000, + ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_QUEUE_TYPE = 830100, + ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_DEAD_LETTER_QUEUE_TYPE = 830200, + ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_BINDING_VERSION_TYPE = 830300, + ASYNCAPI2_SQS_MESSAGE_BINDING = 840000, + ASYNCAPI2_SQS_OPERATION_BINDING = 850000, + ASYNCAPI2_SQS_OPERATION_BINDING_FIELD_QUEUES_TYPE = 850100, + ASYNCAPI2_SQS_OPERATION_BINDING_FIELD_BINDING_VERSION_TYPE = 850200, + ASYNCAPI2_SQS_SERVER_BINDING = 860000, ASYNCAPI2_STOMP_CHANNEL_BINDING = 870000, diff --git a/packages/apidom-ls/test/asyncapi-sqs-bindings.ts b/packages/apidom-ls/test/asyncapi-sqs-bindings.ts new file mode 100644 index 0000000000..cfd8e0fc84 --- /dev/null +++ b/packages/apidom-ls/test/asyncapi-sqs-bindings.ts @@ -0,0 +1,1098 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { assert } from 'chai'; +import { TextDocument } from 'vscode-languageserver-textdocument'; +import { Diagnostic, DiagnosticSeverity } from 'vscode-languageserver-types'; + +// @ts-ignore +import getLanguageService from '../src/apidom-language-service.ts'; +import { + LanguageService, + LanguageServiceContext, + ValidationContext, +} from '../src/apidom-language-types.ts'; +import { metadata } from './metadata.ts'; +import { logPerformance, logLevel } from './test-utils.ts'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + +const specServerBindingAllowedFields010 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-server-binding-allowed-fields-0-1-0.yaml', + ), + ) + .toString(); + +const specServerBindingAllowedFields020 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-server-binding-allowed-fields-0-2-0.yaml', + ), + ) + .toString(); + +const specServerBindingAllowedFields030 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-server-binding-allowed-fields-0-3-0.yaml', + ), + ) + .toString(); + +const specServerBindingAllowedFieldsLatest = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-server-binding-allowed-fields-latest.yaml', + ), + ) + .toString(); + +const specChannelBindingAllowedFields010 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-allowed-fields-0-1-0.yaml', + ), + ) + .toString(); + +const specChannelBindingAllowedFields020 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-allowed-fields-0-2-0.yaml', + ), + ) + .toString(); + +const specChannelBindingAllowedFields030 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-allowed-fields-0-3-0.yaml', + ), + ) + .toString(); + +const specChannelBindingAllowedFieldsLatest = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-allowed-fields-latest.yaml', + ), + ) + .toString(); + +const specOperationBindingAllowedFields010 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-operation-binding-allowed-fields-0-1-0.yaml', + ), + ) + .toString(); + +const specOperationBindingAllowedFields020 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-operation-binding-allowed-fields-0-2-0.yaml', + ), + ) + .toString(); + +const specOperationBindingAllowedFields030 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-operation-binding-allowed-fields-0-3-0.yaml', + ), + ) + .toString(); + +const specOperationBindingAllowedFieldsLatest = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-operation-binding-allowed-fields-latest.yaml', + ), + ) + .toString(); + +const specMessageBindingAllowedFields010 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-message-binding-allowed-fields-0-1-0.yaml', + ), + ) + .toString(); + +const specMessageBindingAllowedFields020 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-message-binding-allowed-fields-0-2-0.yaml', + ), + ) + .toString(); + +const specMessageBindingAllowedFields030 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-message-binding-allowed-fields-0-3-0.yaml', + ), + ) + .toString(); + +const specMessageBindingAllowedFieldsLatest = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-message-binding-allowed-fields-latest.yaml', + ), + ) + .toString(); + +const specChannelBindingQueueType020 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-queue--type-0-2-0.yaml', + ), + ) + .toString(); + +const specChannelBindingQueueType030 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-queue--type-0-3-0.yaml', + ), + ) + .toString(); + +const specChannelBindingQueueTypeLatest = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-queue--type-latest.yaml', + ), + ) + .toString(); + +const specChannelBindingDeadLetterQueueType020 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-dead-letter-queue--type-0-2-0.yaml', + ), + ) + .toString(); + +const specChannelBindingDeadLetterQueueType030 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-dead-letter-queue--type-0-3-0.yaml', + ), + ) + .toString(); + +const specChannelBindingDeadLetterQueueTypeLatest = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-dead-letter-queue--type-latest.yaml', + ), + ) + .toString(); + +const specChannelBindingBindingVersionType = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-binding-version--type.yaml', + ), + ) + .toString(); + +const specOperationBindingQueuesType020 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-operation-binding-queues--type-0-2-0.yaml', + ), + ) + .toString(); + +const specOperationBindingQueuesType030 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-operation-binding-queues--type-0-3-0.yaml', + ), + ) + .toString(); + +const specOperationBindingQueuesTypeLatest = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-operation-binding-queues--type-latest.yaml', + ), + ) + .toString(); + +const specOperationBindingBindingVersionType = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-operation-binding-binding-version--type.yaml', + ), + ) + .toString(); + +describe('asyncapi SQS bindings test', function () { + const context: LanguageServiceContext = { + metadata: metadata(), + validatorProviders: [], + performanceLogs: logPerformance, + logLevel, + }; + + const languageService: LanguageService = getLanguageService(context); + + const validationContext: ValidationContext = { + comments: DiagnosticSeverity.Error, + maxNumberOfProblems: 100, + relatedInformation: false, + }; + + after(function () { + languageService.terminate(); + }); + + // Server binding tests + + it('test SQS server binding allowed fields (0.1.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-server-binding-allowed-fields-0-1-0.yaml', + 'yaml', + 0, + specServerBindingAllowedFields010, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 9, character: 6 }, + end: { line: 9, character: 9 }, + }, + message: + 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS server binding allowed fields (0.2.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-server-binding-allowed-fields-0-2-0.yaml', + 'yaml', + 0, + specServerBindingAllowedFields020, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 9, character: 6 }, + end: { line: 9, character: 9 }, + }, + message: + 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS server binding allowed fields (0.3.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-server-binding-allowed-fields-0-3-0.yaml', + 'yaml', + 0, + specServerBindingAllowedFields030, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 9, character: 6 }, + end: { line: 9, character: 9 }, + }, + message: + 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS server binding allowed fields (latest)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-server-binding-allowed-fields-latest.yaml', + 'yaml', + 0, + specServerBindingAllowedFieldsLatest, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 9, character: 6 }, + end: { line: 9, character: 9 }, + }, + message: + 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + // Channel binding tests + + it('test SQS channel binding allowed fields (0.1.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-allowed-fields-0-1-0.yaml', + 'yaml', + 0, + specChannelBindingAllowedFields010, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 8, character: 6 }, + end: { line: 8, character: 9 }, + }, + message: + 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS channel binding allowed fields (0.2.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-allowed-fields-0-2-0.yaml', + 'yaml', + 0, + specChannelBindingAllowedFields020, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 8, character: 6 }, + end: { line: 8, character: 9 }, + }, + message: 'Object includes not allowed fields.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS channel binding allowed fields (0.3.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-allowed-fields-0-3-0.yaml', + 'yaml', + 0, + specChannelBindingAllowedFields030, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 8, character: 6 }, + end: { line: 8, character: 9 }, + }, + message: 'Object includes not allowed fields.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS channel binding allowed fields (latest)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-allowed-fields-latest.yaml', + 'yaml', + 0, + specChannelBindingAllowedFieldsLatest, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 8, character: 6 }, + end: { line: 8, character: 9 }, + }, + message: 'Object includes not allowed fields.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + // Operation binding tests + + it('test SQS operation binding allowed fields (0.1.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-operation-binding-allowed-fields-0-1-0.yaml', + 'yaml', + 0, + specOperationBindingAllowedFields010, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 13, character: 6 }, + end: { line: 13, character: 9 }, + }, + message: + 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS operation binding allowed fields (0.2.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-operation-binding-allowed-fields-0-2-0.yaml', + 'yaml', + 0, + specOperationBindingAllowedFields020, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 13, character: 6 }, + end: { line: 13, character: 9 }, + }, + message: 'Object includes not allowed fields.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS operation binding allowed fields (0.3.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-operation-binding-allowed-fields-0-3-0.yaml', + 'yaml', + 0, + specOperationBindingAllowedFields030, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 13, character: 6 }, + end: { line: 13, character: 9 }, + }, + message: 'Object includes not allowed fields.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS operation binding allowed fields (latest)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-operation-binding-allowed-fields-latest.yaml', + 'yaml', + 0, + specOperationBindingAllowedFieldsLatest, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 13, character: 6 }, + end: { line: 13, character: 9 }, + }, + message: 'Object includes not allowed fields.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + // Message binding tests + + it('test SQS message binding allowed fields (0.1.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-message-binding-allowed-fields-0-1-0.yaml', + 'yaml', + 0, + specMessageBindingAllowedFields010, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 10, character: 10 }, + end: { line: 10, character: 13 }, + }, + message: + 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS message binding allowed fields (0.2.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-message-binding-allowed-fields-0-2-0.yaml', + 'yaml', + 0, + specMessageBindingAllowedFields020, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 10, character: 10 }, + end: { line: 10, character: 13 }, + }, + message: + 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS message binding allowed fields (0.3.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-message-binding-allowed-fields-0-3-0.yaml', + 'yaml', + 0, + specMessageBindingAllowedFields030, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 10, character: 10 }, + end: { line: 10, character: 13 }, + }, + message: + 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS message binding allowed fields (latest)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-message-binding-allowed-fields-latest.yaml', + 'yaml', + 0, + specMessageBindingAllowedFieldsLatest, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 10, character: 10 }, + end: { line: 10, character: 13 }, + }, + message: + 'This object MUST NOT contain any properties. Its name is reserved for future use.', + severity: 1, + code: 15000, + source: 'apilint', + }, + ]; + assert.deepEqual(result, expected); + }); + + // Channel binding type tests + + it('test SQS channel binding queue type (0.2.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-queue--type-0-2-0.yaml', + 'yaml', + 0, + specChannelBindingQueueType020, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 9, character: 15 }, + end: { line: 9, character: 18 }, + }, + message: "'queue' value must be an object", + severity: 1, + code: 830100, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS channel binding queue type (0.3.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-queue--type-0-3-0.yaml', + 'yaml', + 0, + specChannelBindingQueueType030, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 9, character: 15 }, + end: { line: 9, character: 18 }, + }, + message: "'queue' value must be an object", + severity: 1, + code: 830100, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS channel binding queue type (latest)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-queue--type-latest.yaml', + 'yaml', + 0, + specChannelBindingQueueTypeLatest, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 9, character: 15 }, + end: { line: 9, character: 18 }, + }, + message: "'queue' value must be an object", + severity: 1, + code: 830100, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS channel binding deadLetterQueue type (0.2.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-dead-letter-queue--type-0-2-0.yaml', + 'yaml', + 0, + specChannelBindingDeadLetterQueueType020, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 12, character: 25 }, + end: { line: 12, character: 28 }, + }, + message: "'deadLetterQueue' value must be an object", + severity: 1, + code: 830200, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS channel binding deadLetterQueue type (0.3.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-dead-letter-queue--type-0-3-0.yaml', + 'yaml', + 0, + specChannelBindingDeadLetterQueueType030, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 12, character: 25 }, + end: { line: 12, character: 28 }, + }, + message: "'deadLetterQueue' value must be an object", + severity: 1, + code: 830200, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS channel binding deadLetterQueue type (latest)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-dead-letter-queue--type-latest.yaml', + 'yaml', + 0, + specChannelBindingDeadLetterQueueTypeLatest, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 12, character: 25 }, + end: { line: 12, character: 28 }, + }, + message: "'deadLetterQueue' value must be an object", + severity: 1, + code: 830200, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS channel binding bindingVersion type', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-binding-version--type.yaml', + 'yaml', + 0, + specChannelBindingBindingVersionType, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 9, character: 24 }, + end: { line: 9, character: 27 }, + }, + message: "'bindingVersion' value must be a string", + severity: 1, + code: 830300, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + + // Operation binding type tests + + it('test SQS operation binding queues type (0.2.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-operation-binding-queues--type-0-2-0.yaml', + 'yaml', + 0, + specOperationBindingQueuesType020, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 14, character: 16 }, + end: { line: 14, character: 19 }, + }, + message: "'queues' value must be an array", + severity: 1, + code: 850100, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS operation binding queues type (0.3.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-operation-binding-queues--type-0-3-0.yaml', + 'yaml', + 0, + specOperationBindingQueuesType030, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 14, character: 16 }, + end: { line: 14, character: 19 }, + }, + message: "'queues' value must be an array", + severity: 1, + code: 850100, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS operation binding queues type (latest)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-operation-binding-queues--type-latest.yaml', + 'yaml', + 0, + specOperationBindingQueuesTypeLatest, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 14, character: 16 }, + end: { line: 14, character: 19 }, + }, + message: "'queues' value must be an array", + severity: 1, + code: 850100, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + + it('test SQS operation binding bindingVersion type', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-operation-binding-binding-version--type.yaml', + 'yaml', + 0, + specOperationBindingBindingVersionType, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 14, character: 24 }, + end: { line: 14, character: 27 }, + }, + message: "'bindingVersion' value must be a string", + severity: 1, + code: 850200, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); +}); diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-1-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-1-0.yaml new file mode 100644 index 0000000000..5dd8ed6556 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-1-0.yaml @@ -0,0 +1,11 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + foo: bar + bindingVersion: '0.1.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-2-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-2-0.yaml new file mode 100644 index 0000000000..b1f83b9dc7 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-2-0.yaml @@ -0,0 +1,11 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + foo: bar + bindingVersion: '0.2.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-3-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-3-0.yaml new file mode 100644 index 0000000000..3d816309c9 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-0-3-0.yaml @@ -0,0 +1,11 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + foo: bar + bindingVersion: '0.3.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-latest.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-latest.yaml new file mode 100644 index 0000000000..8c82810f48 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-allowed-fields-latest.yaml @@ -0,0 +1,10 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + foo: bar diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-binding-version--type.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-binding-version--type.yaml new file mode 100644 index 0000000000..fde8befca3 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-binding-version--type.yaml @@ -0,0 +1,10 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + bindingVersion: 123 diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-2-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-2-0.yaml new file mode 100644 index 0000000000..e76767dac1 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-2-0.yaml @@ -0,0 +1,14 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + queue: + name: MyQueue + fifoQueue: false + deadLetterQueue: foo + bindingVersion: '0.2.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-3-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-3-0.yaml new file mode 100644 index 0000000000..497a5e8240 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-3-0.yaml @@ -0,0 +1,14 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + queue: + name: MyQueue + fifoQueue: false + deadLetterQueue: foo + bindingVersion: '0.3.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-latest.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-latest.yaml new file mode 100644 index 0000000000..27d4af36be --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-latest.yaml @@ -0,0 +1,13 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + queue: + name: MyQueue + fifoQueue: false + deadLetterQueue: foo diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-2-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-2-0.yaml new file mode 100644 index 0000000000..b94efeb95b --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-2-0.yaml @@ -0,0 +1,11 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + queue: foo + bindingVersion: '0.2.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-3-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-3-0.yaml new file mode 100644 index 0000000000..1bf32965c5 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-3-0.yaml @@ -0,0 +1,11 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + queue: foo + bindingVersion: '0.3.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-latest.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-latest.yaml new file mode 100644 index 0000000000..2a2b4a84c6 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-latest.yaml @@ -0,0 +1,10 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + queue: foo diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-1-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-1-0.yaml new file mode 100644 index 0000000000..3819f2c304 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-1-0.yaml @@ -0,0 +1,13 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + messages: + message1: + bindings: + sqs: + foo: bar + bindingVersion: '0.1.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-2-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-2-0.yaml new file mode 100644 index 0000000000..c34ff8094a --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-2-0.yaml @@ -0,0 +1,13 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + messages: + message1: + bindings: + sqs: + foo: bar + bindingVersion: '0.2.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-3-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-3-0.yaml new file mode 100644 index 0000000000..439d21310e --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-0-3-0.yaml @@ -0,0 +1,13 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + messages: + message1: + bindings: + sqs: + foo: bar + bindingVersion: '0.3.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-latest.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-latest.yaml new file mode 100644 index 0000000000..6d25b025a6 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-message-binding-allowed-fields-latest.yaml @@ -0,0 +1,12 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + messages: + message1: + bindings: + sqs: + foo: bar diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-1-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-1-0.yaml new file mode 100644 index 0000000000..29433fa0ec --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-1-0.yaml @@ -0,0 +1,16 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example +operations: + operation1: + action: receive + channel: + $ref: '#/channels/channel1' + bindings: + sqs: + foo: bar + bindingVersion: '0.1.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-2-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-2-0.yaml new file mode 100644 index 0000000000..cfa8ee3653 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-2-0.yaml @@ -0,0 +1,16 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example +operations: + operation1: + action: receive + channel: + $ref: '#/channels/channel1' + bindings: + sqs: + foo: bar + bindingVersion: '0.2.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-3-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-3-0.yaml new file mode 100644 index 0000000000..75fd21372a --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-0-3-0.yaml @@ -0,0 +1,16 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example +operations: + operation1: + action: receive + channel: + $ref: '#/channels/channel1' + bindings: + sqs: + foo: bar + bindingVersion: '0.3.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-latest.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-latest.yaml new file mode 100644 index 0000000000..566cd16446 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-allowed-fields-latest.yaml @@ -0,0 +1,15 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example +operations: + operation1: + action: receive + channel: + $ref: '#/channels/channel1' + bindings: + sqs: + foo: bar diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-binding-version--type.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-binding-version--type.yaml new file mode 100644 index 0000000000..d240074be3 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-binding-version--type.yaml @@ -0,0 +1,15 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example +operations: + operation1: + action: receive + channel: + $ref: '#/channels/channel1' + bindings: + sqs: + bindingVersion: 123 diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-2-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-2-0.yaml new file mode 100644 index 0000000000..30e50eb8d3 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-2-0.yaml @@ -0,0 +1,16 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example +operations: + operation1: + action: receive + channel: + $ref: '#/channels/channel1' + bindings: + sqs: + queues: foo + bindingVersion: '0.2.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-3-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-3-0.yaml new file mode 100644 index 0000000000..c5bf30e151 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-3-0.yaml @@ -0,0 +1,16 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example +operations: + operation1: + action: receive + channel: + $ref: '#/channels/channel1' + bindings: + sqs: + queues: foo + bindingVersion: '0.3.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-latest.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-latest.yaml new file mode 100644 index 0000000000..56c6742bfb --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-latest.yaml @@ -0,0 +1,15 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example +operations: + operation1: + action: receive + channel: + $ref: '#/channels/channel1' + bindings: + sqs: + queues: foo diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-1-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-1-0.yaml new file mode 100644 index 0000000000..127a854e06 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-1-0.yaml @@ -0,0 +1,12 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +servers: + server1: + host: example.com + protocol: http + bindings: + sqs: + foo: bar + bindingVersion: '0.1.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-2-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-2-0.yaml new file mode 100644 index 0000000000..41907153a9 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-2-0.yaml @@ -0,0 +1,12 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +servers: + server1: + host: example.com + protocol: http + bindings: + sqs: + foo: bar + bindingVersion: '0.2.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-3-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-3-0.yaml new file mode 100644 index 0000000000..106b14b539 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-0-3-0.yaml @@ -0,0 +1,12 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +servers: + server1: + host: example.com + protocol: http + bindings: + sqs: + foo: bar + bindingVersion: '0.3.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-latest.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-latest.yaml new file mode 100644 index 0000000000..c7a4c687d1 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-server-binding-allowed-fields-latest.yaml @@ -0,0 +1,11 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +servers: + server1: + host: example.com + protocol: http + bindings: + sqs: + foo: bar diff --git a/packages/apidom-ns-asyncapi-2/src/elements/bindings/sqs/SqsChannelBinding.ts b/packages/apidom-ns-asyncapi-2/src/elements/bindings/sqs/SqsChannelBinding.ts index 58fa704ef4..39753dc349 100644 --- a/packages/apidom-ns-asyncapi-2/src/elements/bindings/sqs/SqsChannelBinding.ts +++ b/packages/apidom-ns-asyncapi-2/src/elements/bindings/sqs/SqsChannelBinding.ts @@ -1,4 +1,4 @@ -import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +import { ObjectElement, StringElement, Attributes, Meta } from '@swagger-api/apidom-core'; /** * @public @@ -9,6 +9,30 @@ class SqsChannelBinding extends ObjectElement { this.element = 'sqsChannelBinding'; this.classes.push('channel-binding'); } + + get queue(): ObjectElement | undefined { + return this.get('queue'); + } + + set queue(queue: ObjectElement | undefined) { + this.set('queue', queue); + } + + get deadLetterQueue(): ObjectElement | undefined { + return this.get('deadLetterQueue'); + } + + set deadLetterQueue(deadLetterQueue: ObjectElement | undefined) { + this.set('deadLetterQueue', deadLetterQueue); + } + + get bindingVersion(): StringElement | undefined { + return this.get('bindingVersion'); + } + + set bindingVersion(bindingVersion: StringElement | undefined) { + this.set('bindingVersion', bindingVersion); + } } export default SqsChannelBinding; diff --git a/packages/apidom-ns-asyncapi-2/src/elements/bindings/sqs/SqsOperationBinding.ts b/packages/apidom-ns-asyncapi-2/src/elements/bindings/sqs/SqsOperationBinding.ts index 8aa8a18651..33c373fe40 100644 --- a/packages/apidom-ns-asyncapi-2/src/elements/bindings/sqs/SqsOperationBinding.ts +++ b/packages/apidom-ns-asyncapi-2/src/elements/bindings/sqs/SqsOperationBinding.ts @@ -1,4 +1,10 @@ -import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +import { + ObjectElement, + ArrayElement, + StringElement, + Attributes, + Meta, +} from '@swagger-api/apidom-core'; /** * @public @@ -9,6 +15,22 @@ class SqsOperationBinding extends ObjectElement { this.element = 'sqsOperationBinding'; this.classes.push('operation-binding'); } + + get queues(): ArrayElement | undefined { + return this.get('queues'); + } + + set queues(queues: ArrayElement | undefined) { + this.set('queues', queues); + } + + get bindingVersion(): StringElement | undefined { + return this.get('bindingVersion'); + } + + set bindingVersion(bindingVersion: StringElement | undefined) { + this.set('bindingVersion', bindingVersion); + } } export default SqsOperationBinding; diff --git a/packages/apidom-ns-asyncapi-2/src/refractor/specification.ts b/packages/apidom-ns-asyncapi-2/src/refractor/specification.ts index a7eab8c367..c86827cdfe 100644 --- a/packages/apidom-ns-asyncapi-2/src/refractor/specification.ts +++ b/packages/apidom-ns-asyncapi-2/src/refractor/specification.ts @@ -1235,9 +1235,28 @@ const specification = { }, ChannelBinding: { $visitor: SqsChannelBindingVisitor, + fixedFields: { + queue: { + $ref: '#/visitors/value', + }, + deadLetterQueue: { + $ref: '#/visitors/value', + }, + bindingVersion: { + $ref: '#/visitors/value', + }, + }, }, OperationBinding: { $visitor: SqsOperationBindingVisitor, + fixedFields: { + queues: { + $ref: '#/visitors/value', + }, + bindingVersion: { + $ref: '#/visitors/value', + }, + }, }, MessageBinding: { $visitor: SqsMessageBindingVisitor, diff --git a/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsChannelBinding/__snapshots__/index.ts.snap b/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsChannelBinding/__snapshots__/index.ts.snap index ef00a2cbe5..ddb96801e6 100644 --- a/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsChannelBinding/__snapshots__/index.ts.snap +++ b/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsChannelBinding/__snapshots__/index.ts.snap @@ -1,3 +1,23 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`refractor elements SqsChannelBindingElement should refract to semantic ApiDOM tree 1`] = `(SqsChannelBindingElement)`; +exports[`refractor elements SqsChannelBindingElement should refract to semantic ApiDOM tree 1`] = ` +(SqsChannelBindingElement + (MemberElement + (StringElement) + (ObjectElement + (MemberElement + (StringElement) + (StringElement)) + (MemberElement + (StringElement) + (BooleanElement)))) + (MemberElement + (StringElement) + (ObjectElement + (MemberElement + (StringElement) + (StringElement)))) + (MemberElement + (StringElement) + (StringElement))) +`; diff --git a/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsChannelBinding/index.ts b/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsChannelBinding/index.ts index 76277a166a..878fa1f2d7 100644 --- a/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsChannelBinding/index.ts +++ b/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsChannelBinding/index.ts @@ -7,7 +7,16 @@ describe('refractor', function () { context('elements', function () { context('SqsChannelBindingElement', function () { specify('should refract to semantic ApiDOM tree', function () { - const sqsChannelBindingElement = SqsChannelBindingElement.refract({}); + const sqsChannelBindingElement = SqsChannelBindingElement.refract({ + queue: { + name: 'MyQueue', + fifoQueue: false, + }, + deadLetterQueue: { + name: 'MyDeadLetterQueue', + }, + bindingVersion: '0.2.0', + }); expect(sexprs(sqsChannelBindingElement)).toMatchSnapshot(); }); diff --git a/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsOperationBinding/__snapshots__/index.ts.snap b/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsOperationBinding/__snapshots__/index.ts.snap index 1b92aaf787..5466e35f39 100644 --- a/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsOperationBinding/__snapshots__/index.ts.snap +++ b/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsOperationBinding/__snapshots__/index.ts.snap @@ -1,3 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`refractor elements SqsOperationBindingElement should refract to semantic ApiDOM tree 1`] = `(SqsOperationBindingElement)`; +exports[`refractor elements SqsOperationBindingElement should refract to semantic ApiDOM tree 1`] = ` +(SqsOperationBindingElement + (MemberElement + (StringElement) + (ArrayElement + (ObjectElement + (MemberElement + (StringElement) + (StringElement))))) + (MemberElement + (StringElement) + (StringElement))) +`; diff --git a/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsOperationBinding/index.ts b/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsOperationBinding/index.ts index 6debb27311..2f254eedb9 100644 --- a/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsOperationBinding/index.ts +++ b/packages/apidom-ns-asyncapi-2/test/refractor/elements/bindings/sqs/SqsOperationBinding/index.ts @@ -7,7 +7,14 @@ describe('refractor', function () { context('elements', function () { context('SqsOperationBindingElement', function () { specify('should refract to semantic ApiDOM tree', function () { - const sqsOperationBindingElement = SqsOperationBindingElement.refract({}); + const sqsOperationBindingElement = SqsOperationBindingElement.refract({ + queues: [ + { + name: 'MyQueue', + }, + ], + bindingVersion: '0.2.0', + }); expect(sexprs(sqsOperationBindingElement)).toMatchSnapshot(); }); diff --git a/packages/apidom-ns-asyncapi-3/src/refractor/specification.ts b/packages/apidom-ns-asyncapi-3/src/refractor/specification.ts index df38bde8c6..904bdab4bf 100644 --- a/packages/apidom-ns-asyncapi-3/src/refractor/specification.ts +++ b/packages/apidom-ns-asyncapi-3/src/refractor/specification.ts @@ -1293,9 +1293,28 @@ const specification = { }, ChannelBinding: { $visitor: SqsChannelBindingVisitor, + fixedFields: { + queue: { + $ref: '#/visitors/value', + }, + deadLetterQueue: { + $ref: '#/visitors/value', + }, + bindingVersion: { + $ref: '#/visitors/value', + }, + }, }, OperationBinding: { $visitor: SqsOperationBindingVisitor, + fixedFields: { + queues: { + $ref: '#/visitors/value', + }, + bindingVersion: { + $ref: '#/visitors/value', + }, + }, }, MessageBinding: { $visitor: SqsMessageBindingVisitor, diff --git a/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsChannelBinding/__snapshots__/index.ts.snap b/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsChannelBinding/__snapshots__/index.ts.snap index ef00a2cbe5..ddb96801e6 100644 --- a/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsChannelBinding/__snapshots__/index.ts.snap +++ b/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsChannelBinding/__snapshots__/index.ts.snap @@ -1,3 +1,23 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`refractor elements SqsChannelBindingElement should refract to semantic ApiDOM tree 1`] = `(SqsChannelBindingElement)`; +exports[`refractor elements SqsChannelBindingElement should refract to semantic ApiDOM tree 1`] = ` +(SqsChannelBindingElement + (MemberElement + (StringElement) + (ObjectElement + (MemberElement + (StringElement) + (StringElement)) + (MemberElement + (StringElement) + (BooleanElement)))) + (MemberElement + (StringElement) + (ObjectElement + (MemberElement + (StringElement) + (StringElement)))) + (MemberElement + (StringElement) + (StringElement))) +`; diff --git a/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsChannelBinding/index.ts b/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsChannelBinding/index.ts index 76277a166a..878fa1f2d7 100644 --- a/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsChannelBinding/index.ts +++ b/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsChannelBinding/index.ts @@ -7,7 +7,16 @@ describe('refractor', function () { context('elements', function () { context('SqsChannelBindingElement', function () { specify('should refract to semantic ApiDOM tree', function () { - const sqsChannelBindingElement = SqsChannelBindingElement.refract({}); + const sqsChannelBindingElement = SqsChannelBindingElement.refract({ + queue: { + name: 'MyQueue', + fifoQueue: false, + }, + deadLetterQueue: { + name: 'MyDeadLetterQueue', + }, + bindingVersion: '0.2.0', + }); expect(sexprs(sqsChannelBindingElement)).toMatchSnapshot(); }); diff --git a/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsOperationBinding/__snapshots__/index.ts.snap b/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsOperationBinding/__snapshots__/index.ts.snap index 1b92aaf787..5466e35f39 100644 --- a/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsOperationBinding/__snapshots__/index.ts.snap +++ b/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsOperationBinding/__snapshots__/index.ts.snap @@ -1,3 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`refractor elements SqsOperationBindingElement should refract to semantic ApiDOM tree 1`] = `(SqsOperationBindingElement)`; +exports[`refractor elements SqsOperationBindingElement should refract to semantic ApiDOM tree 1`] = ` +(SqsOperationBindingElement + (MemberElement + (StringElement) + (ArrayElement + (ObjectElement + (MemberElement + (StringElement) + (StringElement))))) + (MemberElement + (StringElement) + (StringElement))) +`; diff --git a/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsOperationBinding/index.ts b/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsOperationBinding/index.ts index 6debb27311..2f254eedb9 100644 --- a/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsOperationBinding/index.ts +++ b/packages/apidom-ns-asyncapi-3/test/refractor/elements/bindings/sqs/SqsOperationBinding/index.ts @@ -7,7 +7,14 @@ describe('refractor', function () { context('elements', function () { context('SqsOperationBindingElement', function () { specify('should refract to semantic ApiDOM tree', function () { - const sqsOperationBindingElement = SqsOperationBindingElement.refract({}); + const sqsOperationBindingElement = SqsOperationBindingElement.refract({ + queues: [ + { + name: 'MyQueue', + }, + ], + bindingVersion: '0.2.0', + }); expect(sexprs(sqsOperationBindingElement)).toMatchSnapshot(); }); From c1584f4c24603330b76a47cc694435a66753319f Mon Sep 17 00:00:00 2001 From: Oliwia Rogala Date: Thu, 12 Mar 2026 14:53:01 +0100 Subject: [PATCH 2/7] fix: update replace-empty-element plugin for SQS Bindings Co-Authored-By: Claude Sonnet 4.6 --- .../refractor/plugins/replace-empty-element.ts | 13 +++++++++++++ .../refractor/plugins/replace-empty-element.ts | 15 +++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/packages/apidom-ns-asyncapi-2/src/refractor/plugins/replace-empty-element.ts b/packages/apidom-ns-asyncapi-2/src/refractor/plugins/replace-empty-element.ts index aca37dbab5..5390e524d7 100644 --- a/packages/apidom-ns-asyncapi-2/src/refractor/plugins/replace-empty-element.ts +++ b/packages/apidom-ns-asyncapi-2/src/refractor/plugins/replace-empty-element.ts @@ -857,6 +857,19 @@ const schema = { return new ArrayElement(...args); }, }, + SqsChannelBindingElement: { + queue(...args: any[]) { + return new ObjectElement(...args); + }, + deadLetterQueue(...args: any[]) { + return new ObjectElement(...args); + }, + }, + SqsOperationBindingElement: { + queues(...args: any[]) { + return new ArrayElement(...args); + }, + }, GooglepubsubChannelBindingElement: { labels(...args: any[]) { return new ObjectElement(...args); diff --git a/packages/apidom-ns-asyncapi-3/src/refractor/plugins/replace-empty-element.ts b/packages/apidom-ns-asyncapi-3/src/refractor/plugins/replace-empty-element.ts index 587f7d0263..cbd58e5342 100644 --- a/packages/apidom-ns-asyncapi-3/src/refractor/plugins/replace-empty-element.ts +++ b/packages/apidom-ns-asyncapi-3/src/refractor/plugins/replace-empty-element.ts @@ -952,6 +952,21 @@ const schema: Record = { }, }, + SqsChannelBindingElement: { + queue(...args: Record[]) { + return new ObjectElement(...args); + }, + deadLetterQueue(...args: Record[]) { + return new ObjectElement(...args); + }, + }, + + SqsOperationBindingElement: { + queues(...args: ConstructorParameters) { + return new ArrayElement(...args); + }, + }, + GooglepubsubChannelBindingElement: { labels(...args: Record[]) { return new ObjectElement(...args); From 9a74f1125373cf4c7e6b6ec2855a041153edb2a3 Mon Sep 17 00:00:00 2001 From: Oliwia Rogala Date: Fri, 13 Mar 2026 10:30:39 +0100 Subject: [PATCH 3/7] fix(ls): add version 0.1.0 to SQS bindings completion --- .../bindings/sqs/channel-binding/completion/index.ts | 9 +++++++++ .../bindings/sqs/operation-binding/completion/index.ts | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts index a9954b2611..90f0c8332a 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts @@ -23,6 +23,15 @@ const completion: ApidomCompletionItem[] = [ value: '**Optional**, defaults to `latest`. The version of this binding.', }, }, + { + target: 'bindingVersion', + label: '0.1.0', + insertText: '0.1.0', + kind: 12, + format: CompletionFormat.QUOTED_FORCED, + type: CompletionType.VALUE, + insertTextFormat: 2, + }, { target: 'bindingVersion', label: '0.2.0', diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts index a9954b2611..90f0c8332a 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts @@ -23,6 +23,15 @@ const completion: ApidomCompletionItem[] = [ value: '**Optional**, defaults to `latest`. The version of this binding.', }, }, + { + target: 'bindingVersion', + label: '0.1.0', + insertText: '0.1.0', + kind: 12, + format: CompletionFormat.QUOTED_FORCED, + type: CompletionType.VALUE, + insertTextFormat: 2, + }, { target: 'bindingVersion', label: '0.2.0', From c505befd84facfb9763d80e85559bcaf3f2bff6c Mon Sep 17 00:00:00 2001 From: Oliwia Rogala Date: Mon, 16 Mar 2026 14:06:30 +0100 Subject: [PATCH 4/7] fix: replace-empty-element new element types --- .../src/refractor/plugins/replace-empty-element.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/apidom-ns-asyncapi-2/src/refractor/plugins/replace-empty-element.ts b/packages/apidom-ns-asyncapi-2/src/refractor/plugins/replace-empty-element.ts index 5390e524d7..10badc44c9 100644 --- a/packages/apidom-ns-asyncapi-2/src/refractor/plugins/replace-empty-element.ts +++ b/packages/apidom-ns-asyncapi-2/src/refractor/plugins/replace-empty-element.ts @@ -858,15 +858,15 @@ const schema = { }, }, SqsChannelBindingElement: { - queue(...args: any[]) { + queue(...args: Record[]) { return new ObjectElement(...args); }, - deadLetterQueue(...args: any[]) { + deadLetterQueue(...args: Record[]) { return new ObjectElement(...args); }, }, SqsOperationBindingElement: { - queues(...args: any[]) { + queues(...args: ConstructorParameters) { return new ArrayElement(...args); }, }, From 5618ba6a70bb00732e3e753afb05495c75a17e70 Mon Sep 17 00:00:00 2001 From: Oliwia Rogala Date: Mon, 16 Mar 2026 15:53:06 +0100 Subject: [PATCH 5/7] fix: version-specific completion docs, version 0.1.0 adjustment --- .../sqs/channel-binding/completion/0-1-0.ts | 50 +++++++ .../sqs/channel-binding/completion/0-2-0.ts | 4 +- .../sqs/channel-binding/completion/index.ts | 2 + .../lint/0-1-0/allowed-fields.ts | 4 +- .../lint/0-1-0/dead-letter-queue--type.ts | 25 ++++ .../sqs/channel-binding/lint/0-1-0/index.ts | 4 +- .../channel-binding/lint/0-1-0/queue--type.ts | 25 ++++ .../sqs/operation-binding/completion/0-1-0.ts | 30 +++++ .../sqs/operation-binding/completion/0-2-0.ts | 2 +- .../sqs/operation-binding/completion/index.ts | 2 + .../lint/0-1-0/allowed-fields.ts | 4 +- .../sqs/operation-binding/lint/0-1-0/index.ts | 3 +- .../lint/0-1-0/queues--type.ts | 25 ++++ .../apidom-ls/test/asyncapi-sqs-bindings.ts | 123 +++++++++++++++++- ...binding-dead-letter-queue--type-0-1-0.yaml | 14 ++ ...sqs-channel-binding-queue--type-0-1-0.yaml | 11 ++ ...-operation-binding-queues--type-0-1-0.yaml | 16 +++ 17 files changed, 331 insertions(+), 13 deletions(-) create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/dead-letter-queue--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/queue--type.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts create mode 100644 packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/queues--type.ts create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-1-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-1-0.yaml create mode 100644 packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-1-0.yaml diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts new file mode 100644 index 0000000000..1426ff0eef --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts @@ -0,0 +1,50 @@ +import { + ApidomCompletionItem, + CompletionFormat, + CompletionType, +} from '../../../../../../apidom-language-types.ts'; + +const completion: ApidomCompletionItem[] = [ + { + label: 'queue', + insertText: 'queue', + kind: 14, + format: CompletionFormat.OBJECT, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used as the channel.', + }, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.1.0']], + }, + ], + }, + { + label: 'deadLetterQueue', + insertText: 'deadLetterQueue', + kind: 14, + format: CompletionFormat.OBJECT, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used for un-processable messages.', + }, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.1.0']], + }, + ], + }, +]; + +export default completion; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts index 7946d810b0..c895240d0d 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used as the channel.', + '[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used as the channel.', }, conditions: [ { @@ -35,7 +35,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used for un-processable messages.', + '[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used for un-processable messages.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts index 90f0c8332a..b9fac8f768 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/index.ts @@ -1,3 +1,4 @@ +import completion0_1_0Items from './0-1-0.ts'; import completion0_2_0Items from './0-2-0.ts'; import completion0_3_0Items from './0-3-0.ts'; import completionLatestItems from './latest.ts'; @@ -8,6 +9,7 @@ import { } from '../../../../../../apidom-language-types.ts'; const completion: ApidomCompletionItem[] = [ + ...completion0_1_0Items, ...completion0_2_0Items, ...completion0_3_0Items, ...completionLatestItems, diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/allowed-fields.ts index 1304f42fb9..1851268b72 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/allowed-fields.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/allowed-fields.ts @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; const allowedFieldsLint: LinterMeta = { code: ApilintCodes.NOT_ALLOWED_FIELDS, source: 'apilint', - message: 'This object MUST NOT contain any properties. Its name is reserved for future use.', + message: 'Object includes not allowed fields.', severity: DiagnosticSeverity.Error, linterFunction: 'allowedFields', - linterParams: [[]], + linterParams: [['queue', 'deadLetterQueue', 'bindingVersion']], marker: 'key', conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/dead-letter-queue--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/dead-letter-queue--type.ts new file mode 100644 index 0000000000..54aa33c338 --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/dead-letter-queue--type.ts @@ -0,0 +1,25 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const deadLetterQueueTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_DEAD_LETTER_QUEUE_TYPE, + source: 'apilint', + message: "'deadLetterQueue' value must be an object", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['object'], + marker: 'value', + target: 'deadLetterQueue', + data: {}, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.1.0']], + }, + ], +}; + +export default deadLetterQueueTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/index.ts index 47f7d48761..fb8c020f87 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/index.ts @@ -1,5 +1,7 @@ import allowedFieldsLint from './allowed-fields.ts'; +import queueTypeLint from './queue--type.ts'; +import deadLetterQueueTypeLint from './dead-letter-queue--type.ts'; -const lints = [allowedFieldsLint]; +const lints = [queueTypeLint, deadLetterQueueTypeLint, allowedFieldsLint]; export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/queue--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/queue--type.ts new file mode 100644 index 0000000000..828374874a --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/lint/0-1-0/queue--type.ts @@ -0,0 +1,25 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const queueTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_CHANNEL_BINDING_FIELD_QUEUE_TYPE, + source: 'apilint', + message: "'queue' value must be an object", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['object'], + marker: 'value', + target: 'queue', + data: {}, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.1.0']], + }, + ], +}; + +export default queueTypeLint; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts new file mode 100644 index 0000000000..4b7e3021ce --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts @@ -0,0 +1,30 @@ +import { + ApidomCompletionItem, + CompletionFormat, + CompletionType, +} from '../../../../../../apidom-language-types.ts'; + +const completion: ApidomCompletionItem[] = [ + { + label: 'queues', + insertText: 'queues', + kind: 14, + format: CompletionFormat.ARRAY, + type: CompletionType.PROPERTY, + insertTextFormat: 2, + documentation: { + kind: 'markdown', + value: + '[[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)]\n\\\n\\\nQueue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', + }, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.1.0']], + }, + ], + }, +]; + +export default completion; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts index 760a838a5e..74ac824bec 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\nQueue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', + '[[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)]\n\\\n\\\nQueue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts index 90f0c8332a..b9fac8f768 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/index.ts @@ -1,3 +1,4 @@ +import completion0_1_0Items from './0-1-0.ts'; import completion0_2_0Items from './0-2-0.ts'; import completion0_3_0Items from './0-3-0.ts'; import completionLatestItems from './latest.ts'; @@ -8,6 +9,7 @@ import { } from '../../../../../../apidom-language-types.ts'; const completion: ApidomCompletionItem[] = [ + ...completion0_1_0Items, ...completion0_2_0Items, ...completion0_3_0Items, ...completionLatestItems, diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/allowed-fields.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/allowed-fields.ts index 1304f42fb9..e923cd4e02 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/allowed-fields.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/allowed-fields.ts @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; const allowedFieldsLint: LinterMeta = { code: ApilintCodes.NOT_ALLOWED_FIELDS, source: 'apilint', - message: 'This object MUST NOT contain any properties. Its name is reserved for future use.', + message: 'Object includes not allowed fields.', severity: DiagnosticSeverity.Error, linterFunction: 'allowedFields', - linterParams: [[]], + linterParams: [['queues', 'bindingVersion']], marker: 'key', conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/index.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/index.ts index 47f7d48761..35d0f6b7bf 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/index.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/index.ts @@ -1,5 +1,6 @@ import allowedFieldsLint from './allowed-fields.ts'; +import queuesTypeLint from './queues--type.ts'; -const lints = [allowedFieldsLint]; +const lints = [queuesTypeLint, allowedFieldsLint]; export default lints; diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/queues--type.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/queues--type.ts new file mode 100644 index 0000000000..1050c77acb --- /dev/null +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/lint/0-1-0/queues--type.ts @@ -0,0 +1,25 @@ +import { DiagnosticSeverity } from 'vscode-languageserver-types'; + +import ApilintCodes from '../../../../../../codes.ts'; +import { LinterMeta } from '../../../../../../../apidom-language-types.ts'; + +const queuesTypeLint: LinterMeta = { + code: ApilintCodes.ASYNCAPI2_SQS_OPERATION_BINDING_FIELD_QUEUES_TYPE, + source: 'apilint', + message: "'queues' value must be an array", + severity: DiagnosticSeverity.Error, + linterFunction: 'apilintType', + linterParams: ['array'], + marker: 'value', + target: 'queues', + data: {}, + conditions: [ + { + targets: [{ path: 'bindingVersion' }], + function: 'apilintValueOrArray', + params: [['0.1.0']], + }, + ], +}; + +export default queuesTypeLint; diff --git a/packages/apidom-ls/test/asyncapi-sqs-bindings.ts b/packages/apidom-ls/test/asyncapi-sqs-bindings.ts index cfd8e0fc84..209e56cbda 100644 --- a/packages/apidom-ls/test/asyncapi-sqs-bindings.ts +++ b/packages/apidom-ls/test/asyncapi-sqs-bindings.ts @@ -241,6 +241,34 @@ const specMessageBindingAllowedFieldsLatest = fs ) .toString(); +const specChannelBindingQueueType010 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-queue--type-0-1-0.yaml', + ), + ) + .toString(); + +const specChannelBindingDeadLetterQueueType010 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-channel-binding-dead-letter-queue--type-0-1-0.yaml', + ), + ) + .toString(); + const specChannelBindingQueueType020 = fs .readFileSync( path.join( @@ -339,6 +367,20 @@ const specChannelBindingBindingVersionType = fs ) .toString(); +const specOperationBindingQueuesType010 = fs + .readFileSync( + path.join( + __dirname, + 'fixtures', + 'validation', + 'asyncapi', + 'bindings', + 'sqs', + 'sqs-operation-binding-queues--type-0-1-0.yaml', + ), + ) + .toString(); + const specOperationBindingQueuesType020 = fs .readFileSync( path.join( @@ -534,8 +576,7 @@ describe('asyncapi SQS bindings test', function () { start: { line: 8, character: 6 }, end: { line: 8, character: 9 }, }, - message: - 'This object MUST NOT contain any properties. Its name is reserved for future use.', + message: 'Object includes not allowed fields.', severity: 1, code: 15000, source: 'apilint', @@ -633,8 +674,7 @@ describe('asyncapi SQS bindings test', function () { start: { line: 13, character: 6 }, end: { line: 13, character: 9 }, }, - message: - 'This object MUST NOT contain any properties. Its name is reserved for future use.', + message: 'Object includes not allowed fields.', severity: 1, code: 15000, source: 'apilint', @@ -819,6 +859,31 @@ describe('asyncapi SQS bindings test', function () { // Channel binding type tests + it('test SQS channel binding queue type (0.1.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-queue--type-0-1-0.yaml', + 'yaml', + 0, + specChannelBindingQueueType010, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 9, character: 15 }, + end: { line: 9, character: 18 }, + }, + message: "'queue' value must be an object", + severity: 1, + code: 830100, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + it('test SQS channel binding queue type (0.2.0)', async function () { const doc: TextDocument = TextDocument.create( 'foo://bar/sqs-channel-binding-queue--type-0-2-0.yaml', @@ -894,6 +959,31 @@ describe('asyncapi SQS bindings test', function () { assert.deepEqual(result, expected); }); + it('test SQS channel binding deadLetterQueue type (0.1.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-channel-binding-dead-letter-queue--type-0-1-0.yaml', + 'yaml', + 0, + specChannelBindingDeadLetterQueueType010, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 12, character: 25 }, + end: { line: 12, character: 28 }, + }, + message: "'deadLetterQueue' value must be an object", + severity: 1, + code: 830200, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + it('test SQS channel binding deadLetterQueue type (0.2.0)', async function () { const doc: TextDocument = TextDocument.create( 'foo://bar/sqs-channel-binding-dead-letter-queue--type-0-2-0.yaml', @@ -996,6 +1086,31 @@ describe('asyncapi SQS bindings test', function () { // Operation binding type tests + it('test SQS operation binding queues type (0.1.0)', async function () { + const doc: TextDocument = TextDocument.create( + 'foo://bar/sqs-operation-binding-queues--type-0-1-0.yaml', + 'yaml', + 0, + specOperationBindingQueuesType010, + ); + + const result = await languageService.doValidation(doc, validationContext); + const expected: Diagnostic[] = [ + { + range: { + start: { line: 14, character: 16 }, + end: { line: 14, character: 19 }, + }, + message: "'queues' value must be an array", + severity: 1, + code: 850100, + source: 'apilint', + data: {}, + }, + ]; + assert.deepEqual(result, expected); + }); + it('test SQS operation binding queues type (0.2.0)', async function () { const doc: TextDocument = TextDocument.create( 'foo://bar/sqs-operation-binding-queues--type-0-2-0.yaml', diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-1-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-1-0.yaml new file mode 100644 index 0000000000..251ae92d25 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-dead-letter-queue--type-0-1-0.yaml @@ -0,0 +1,14 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + queue: + name: MyQueue + fifoQueue: false + deadLetterQueue: foo + bindingVersion: '0.1.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-1-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-1-0.yaml new file mode 100644 index 0000000000..3aa8bb5af4 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-channel-binding-queue--type-0-1-0.yaml @@ -0,0 +1,11 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example + bindings: + sqs: + queue: foo + bindingVersion: '0.1.0' diff --git a/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-1-0.yaml b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-1-0.yaml new file mode 100644 index 0000000000..52e70e3706 --- /dev/null +++ b/packages/apidom-ls/test/fixtures/validation/asyncapi/bindings/sqs/sqs-operation-binding-queues--type-0-1-0.yaml @@ -0,0 +1,16 @@ +asyncapi: 3.0.0 +info: + title: Sample AsyncAPI + version: '1.0.0' +channels: + channel1: + address: example +operations: + operation1: + action: receive + channel: + $ref: '#/channels/channel1' + bindings: + sqs: + queues: foo + bindingVersion: '0.1.0' From cfb7e1006958246d5f710dd095013034d4275f78 Mon Sep 17 00:00:00 2001 From: Oliwia Rogala Date: Tue, 17 Mar 2026 10:19:28 +0100 Subject: [PATCH 6/7] fix: update completion and docs for nested fields --- .../bindings/sqs/channel-binding/completion/0-1-0.ts | 4 ++-- .../bindings/sqs/channel-binding/completion/0-2-0.ts | 4 ++-- .../bindings/sqs/channel-binding/completion/0-3-0.ts | 4 ++-- .../sqs/channel-binding/completion/latest.ts | 4 ++-- .../bindings/sqs/channel-binding/documentation.ts | 12 ++++++++++++ .../sqs/operation-binding/completion/0-1-0.ts | 2 +- .../sqs/operation-binding/completion/0-2-0.ts | 2 +- .../sqs/operation-binding/completion/0-3-0.ts | 2 +- .../sqs/operation-binding/completion/latest.ts | 2 +- .../bindings/sqs/operation-binding/documentation.ts | 8 ++++++++ 10 files changed, 32 insertions(+), 12 deletions(-) diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts index 1426ff0eef..a2b91f2978 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used as the channel.', + '[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { @@ -35,7 +35,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used for un-processable messages.', + '[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts index c895240d0d..48b174650c 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used as the channel.', + '[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { @@ -35,7 +35,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used for un-processable messages.', + '[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts index ab25695c2d..efcef3ebe7 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used as the channel.', + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { @@ -35,7 +35,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used for un-processable messages.', + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts index a787c77ee4..1603056d69 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used as the channel.', + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { @@ -34,7 +34,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\nA definition of the queue that will be used for un-processable messages.', + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/documentation.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/documentation.ts index 2cca2e812b..2b4a0df309 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/documentation.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/documentation.ts @@ -1,4 +1,16 @@ const documentation = [ + { + target: 'queue', + docs: '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + }, + { + target: 'deadLetterQueue', + docs: '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + }, + { + target: 'bindingVersion', + docs: '`string`\n\\\n\\\n**Optional**, defaults to `latest`. The version of this binding.', + }, { docs: '#### [Channel Binding Object](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#channel-binding-object)\n\n##### Fixed Fields\n\nField Name | Type | Description\n---|:---:|---\nqueue | [Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue) | **Required**. A definition of the queue that will be used as the channel.\ndeadLetterQueue | [Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue) | **Optional**. A definition of the queue that will be used for un-processable messages.\nbindingVersion | string | **Optional**, defaults to `latest`. The version of this binding.', }, diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts index 4b7e3021ce..e738ed42bb 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)]\n\\\n\\\nQueue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', + '[[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts index 74ac824bec..ade708f4f8 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)]\n\\\n\\\nQueue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', + '[[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts index a3bad0f5cf..3338e94739 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\nQueue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', + '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts index f1212b7c4d..4c6aa3ea1a 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\nQueue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', + '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/documentation.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/documentation.ts index c5cb484b8c..2b6fac8fbb 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/documentation.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/documentation.ts @@ -1,4 +1,12 @@ const documentation = [ + { + target: 'queues', + docs: '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + }, + { + target: 'bindingVersion', + docs: '`string`\n\\\n\\\n**Optional**, defaults to `latest`. The version of this binding.', + }, { docs: '#### [Operation Binding Object](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#operation-binding-object)\n\n##### Fixed Fields\n\nField Name | Type | Description\n---|:---:|---\nqueues | [[Queue]](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue) | **Required**. Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.\nbindingVersion | string | **Optional**, defaults to `latest`. The version of this binding.', }, From c39d7a6bdabf70b6c6f23ce026d8db55bb6295ea Mon Sep 17 00:00:00 2001 From: Oliwia Rogala Date: Tue, 17 Mar 2026 13:36:46 +0100 Subject: [PATCH 7/7] fix: remove nested fields docs from completion --- .../asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts | 4 ++-- .../asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts | 4 ++-- .../asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts | 4 ++-- .../bindings/sqs/channel-binding/completion/latest.ts | 4 ++-- .../bindings/sqs/operation-binding/completion/0-1-0.ts | 2 +- .../bindings/sqs/operation-binding/completion/0-2-0.ts | 2 +- .../bindings/sqs/operation-binding/completion/0-3-0.ts | 2 +- .../bindings/sqs/operation-binding/completion/latest.ts | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts index a2b91f2978..7c5289067e 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-1-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.', }, conditions: [ { @@ -35,7 +35,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts index 48b174650c..7fbc16be22 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-2-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.', }, conditions: [ { @@ -35,7 +35,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts index efcef3ebe7..c7632d43aa 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/0-3-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.', }, conditions: [ { @@ -35,7 +35,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts index 1603056d69..5e6d45bfd3 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/channel-binding/completion/latest.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Required.** A definition of the queue that will be used as the channel.', }, conditions: [ { @@ -34,7 +34,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)\n\\\n\\\n**Optional.** A definition of the queue that will be used for un-processable messages.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts index e738ed42bb..67a2ec8734 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-1-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[[Queue](https://github.com/asyncapi/bindings/blob/85b00377193b8ffd3c8f565db25981bbd2e4dde9/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts index ade708f4f8..0f9f1dd51f 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-2-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[[Queue](https://github.com/asyncapi/bindings/blob/e14c6782a95aaa009d33b9a6b72194cbaebd39ff/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts index 3338e94739..b4282dde0d 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/0-3-0.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', }, conditions: [ { diff --git a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts index 4c6aa3ea1a..59aac21aaa 100644 --- a/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts +++ b/packages/apidom-ls/src/config/asyncapi/bindings/sqs/operation-binding/completion/latest.ts @@ -15,7 +15,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.\n\nField Name | Type | Description\n---|:---:|---\n`name` | string | **Required.** The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field.\n`fifoQueue` | boolean | **Required.** Is this a FIFO queue?\n`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. This property applies only to high throughput for FIFO queues.\n`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. This property applies only to high throughput for FIFO queues.\n`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue. Range is 0 to 15 minutes. Defaults to 0.\n`visibilityTimeout` | integer | **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds.\n`receiveMessageWaitTime` | integer | **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.\n`messageRetentionPeriod` | integer | **Optional.** How long to retain a message on the queue in seconds, unless deleted. The range is 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days).\n`redrivePolicy` | [Redrive Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.\n`policy` | [Policy](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#policy) | **Optional.** The security policy for the SQS Queue.\n`tags` | object | **Optional.** Key-value pairs that represent AWS tags on the queue.', + '[[Queue](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#queue)]\n\\\n\\\n**Required.** Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.', }, conditions: [ {