Skip to content

Commit

Permalink
fix: move to old shape of asyncapi-schema rule
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmatatjahu committed Feb 19, 2022
1 parent 15a667a commit ca8f87b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ testRule('asyncapi-schema', [
version: '1.0',
},
},
errors: [{ message: 'Object must have required property "channels".', severity: DiagnosticSeverity.Error }],
errors: [{ message: 'Object must have required property "channels"', severity: DiagnosticSeverity.Error }],
},
]);
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('asyncApi2DocumentSchema', () => {
).toEqual([
{
code: 'asyncapi-schema',
message: '"info" property must have required property "title".',
message: '"info" property must have required property "title"',
path: ['info'],
severity: DiagnosticSeverity.Error,
range: expect.any(Object),
Expand Down Expand Up @@ -131,14 +131,14 @@ describe('asyncApi2DocumentSchema', () => {
).toEqual([
{
code: 'asyncapi-schema',
message: '"0" property type must be string.',
message: '"0" property type must be string',
path: ['channels', '/user/signedup', 'servers', '0'],
severity: DiagnosticSeverity.Error,
range: expect.any(Object),
},
{
code: 'asyncapi-schema',
message: '"2" property type must be string.',
message: '"2" property type must be string',
path: ['channels', '/user/signedup', 'servers', '2'],
severity: DiagnosticSeverity.Error,
range: expect.any(Object),
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('asyncApi2DocumentSchema', () => {
).toEqual([
{
code: 'asyncapi-schema',
message: '"kafka" property must have required property "url".',
message: '"kafka" property must have required property "url"',
path: ['components', 'servers', 'kafka'],
severity: DiagnosticSeverity.Error,
range: expect.any(Object),
Expand Down
4 changes: 2 additions & 2 deletions packages/rulesets/src/asyncapi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ export default {
},
'asyncapi-schema': {
description: 'Validate structure of AsyncAPI v2 specification.',
message: '{{error}}.',
severity: 0,
message: '{{error}}',
severity: 'error',
recommended: true,
type: 'validation',
given: '$',
Expand Down

0 comments on commit ca8f87b

Please sign in to comment.