Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const completion: ApidomCompletionItem[] = [
label: 'messageId',
insertText: 'messageId',
kind: 14,
format: CompletionFormat.OBJECT,
format: CompletionFormat.QUOTED,
type: CompletionType.PROPERTY,
insertTextFormat: 2,
documentation: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LinterMeta } from '../../../../apidom-language-types';
const messageContentTypeLint: LinterMeta = {
code: ApilintCodes.MESSAGE_CONTENTTYPE,
source: 'apilint',
message: "contentType' value must be a string",
message: "'contentType' value must be a string",
severity: 1,
linterFunction: 'apilintType',
linterParams: ['string'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LinterMeta } from '../../../../apidom-language-types';
const messageDescriptionLint: LinterMeta = {
code: ApilintCodes.MESSAGE_DESCRIPTION,
source: 'apilint',
message: "description' value must be a string",
message: "'description' value must be a string",
severity: 1,
linterFunction: 'apilintType',
linterParams: ['string'],
Expand Down
6 changes: 4 additions & 2 deletions packages/apidom-ls/src/config/asyncapi/message/lint/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import messageIdLint from './messageId';
import messageTagsLint from './tags';
import messageDescriptionLint from './description';
import messageSummaryLint from './summary';
Expand All @@ -6,7 +7,7 @@ import messageBindingsLint from './bindings';
import messageTraitsLint from './traits';
import messageAllowedFields2_0__2_3Lint from './allowed-fields-2-0--2-3';
import messageAllowedFields2_4Lint from './allowed-fields-2-4';
import messageHeaders from './headers';
import messageHeadersLint from './headers';
import messageCorrelationId from './correlation-id';
import messageSchemaFormatLint from './schema-format';
import message$RefLint from './ref';
Expand All @@ -17,7 +18,8 @@ import messageTitleLint from './title';
import messageExamplesLint from './examples';

const lints = [
messageHeaders,
messageIdLint,
messageHeadersLint,
messageTagsLint,
messageDescriptionLint,
messageSummaryLint,
Expand Down
16 changes: 16 additions & 0 deletions packages/apidom-ls/src/config/asyncapi/message/lint/messageId.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';

const messageIdLint: LinterMeta = {
code: ApilintCodes.MESSAGE_ID,
source: 'apilint',
message: "'messageId' value must be a string",
severity: 1,
linterFunction: 'apilintType',
linterParams: ['string'],
marker: 'value',
target: 'messageId',
data: {},
};

export default messageIdLint;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LinterMeta } from '../../../../apidom-language-types';
const messageNameLint: LinterMeta = {
code: ApilintCodes.MESSAGE_NAME,
source: 'apilint',
message: "name' value must be a string",
message: "'name' value must be a string",
severity: 1,
linterFunction: 'apilintType',
linterParams: ['string'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LinterMeta } from '../../../../apidom-language-types';
const messageSchemaFormatLint: LinterMeta = {
code: ApilintCodes.MESSAGE_SCHEMAFORMAT,
source: 'apilint',
message: "schemaFormat' value must be a string",
message: "'schemaFormat' value must be a string",
severity: 1,
linterFunction: 'apilintType',
linterParams: ['string'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LinterMeta } from '../../../../apidom-language-types';
const messageSummaryLint: LinterMeta = {
code: ApilintCodes.MESSAGE_SUMMARY,
source: 'apilint',
message: "summary' value must be a string",
message: "'summary' value must be a string",
severity: 1,
linterFunction: 'apilintType',
linterParams: ['string'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LinterMeta } from '../../../../apidom-language-types';
const messageTitleLint: LinterMeta = {
code: ApilintCodes.MESSAGE_TITLE,
source: 'apilint',
message: "title' value must be a string",
message: "'title' value must be a string",
severity: 1,
linterFunction: 'apilintType',
linterParams: ['string'],
Expand Down
1 change: 1 addition & 0 deletions packages/apidom-ls/src/config/codes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ enum ApilintCodes {
COMPONENTS_SERVER_VARIABLES,
SERVER_REF,
SERVER_REF_SIBLINGS,
MESSAGE_ID,
}

export default ApilintCodes;