Skip to content

Commit

Permalink
fix(ls): allow AsyncAPI 2.0 Schema Object to be Boolean JSON Schema (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
char0n committed Jan 31, 2024
1 parent e3a9ee9 commit e3cbbe9
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types';
const headersTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_ANYPOINTMQ_MESSAGE_BINDING_FIELD_HEADERS_TYPE,
source: 'apilint',
message: 'headers must be an object',
message: 'headers must be an object or a boolean JSON schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'headers',
data: {},
Expand Down
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types';
const headersTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_ANYPOINTMQ_MESSAGE_BINDING_FIELD_HEADERS_TYPE,
source: 'apilint',
message: 'headers must be an object',
message: 'headers must be an object or a boolean JSON schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'headers',
data: {},
Expand Down
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types';
const headersTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_HTTP_MESSAGE_BINDING_FIELD_HEADERS_TYPE,
source: 'apilint',
message: 'headers must be an object',
message: 'headers must be an object or a boolean JSON schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'headers',
data: {},
Expand Down
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types';
const headersTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_HTTP_MESSAGE_BINDING_FIELD_HEADERS_TYPE,
source: 'apilint',
message: 'headers must be an object',
message: 'headers must be an object or a boolean JSON schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'headers',
data: {},
Expand Down
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types';
const queryTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_HTTP_OPERATION_BINDING_FIELD_QUERY_TYPE,
source: 'apilint',
message: 'query must be an object',
message: 'query must be an object or a boolean JSON schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'query',
data: {},
Expand Down
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types';
const queryTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_HTTP_OPERATION_BINDING_FIELD_QUERY_TYPE,
source: 'apilint',
message: 'query must be an object',
message: 'query must be an object or a boolean JSON schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'query',
data: {},
Expand Down
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types';
const headersTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_WEB_SOCKET_CHANNEL_BINDING_FIELD_HEADERS_TYPE,
source: 'apilint',
message: 'headers must be an object',
message: 'headers must be an object or a boolean JSON schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'headers',
data: {},
Expand Down
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types';
const queryTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_WEB_SOCKET_CHANNEL_BINDING_FIELD_QUERY_TYPE,
source: 'apilint',
message: 'query must be an object',
message: 'query must be an object or a boolean JSON schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'query',
data: {},
Expand Down
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types';
const headersTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_WEB_SOCKET_CHANNEL_BINDING_FIELD_HEADERS_TYPE,
source: 'apilint',
message: 'headers must be an object',
message: 'headers must be an object or a boolean JSON schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'headers',
data: {},
Expand Down
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../../../../apidom-language-types';
const queryTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_WEB_SOCKET_CHANNEL_BINDING_FIELD_QUERY_TYPE,
source: 'apilint',
message: 'query must be an object',
message: 'query must be an object or a boolean JSON schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'query',
data: {},
Expand Down
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../apidom-language-types';
const headersTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_MESSAGE_TRAIT_FIELD_HEADERS_TYPE,
source: 'apilint',
message: "'headers' must be a schema object",
message: "'headers' must be a schema object or a boolean JSON schema",
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'headers',
data: {},
Expand Down
Expand Up @@ -6,10 +6,10 @@ import { LinterMeta } from '../../../../apidom-language-types';
const headersTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_MESSAGE_FIELD_HEADERS_TYPE,
source: 'apilint',
message: "'headers' must be a schema object",
message: "'headers' must be a schema object or a boolean JSON schema",
severity: DiagnosticSeverity.Error,
linterFunction: 'apilintElementOrClass',
linterParams: [['schema']],
linterParams: [['schema', 'boolean']],
marker: 'value',
target: 'headers',
data: {},
Expand Down

0 comments on commit e3cbbe9

Please sign in to comment.