Skip to content

Commit

Permalink
feat: support upcomming release of AsyncAPI 2.2.0 (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni authored Sep 24, 2021
1 parent 1093113 commit 4ab0052
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/processors/AsyncAPIInputProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AsyncapiV2Schema } from '../models/AsyncapiV2Schema';
* Class for processing AsyncAPI inputs
*/
export class AsyncAPIInputProcessor extends AbstractInputProcessor {
static supportedVersions = ['2.0.0', '2.1.0'];
static supportedVersions = ['2.0.0', '2.1.0', '2.2.0'];

/**
* Process the input as an AsyncAPI document
Expand Down
4 changes: 4 additions & 0 deletions test/processors/AsyncAPIInputProcessor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ describe('AsyncAPIInputProcessor', () => {
const parsedObject = {asyncapi: '2.1.0'};
expect(processor.shouldProcess(parsedObject)).toEqual(true);
});
test('should be able to process AsyncAPI 2.2.0', () => {
const parsedObject = {asyncapi: '2.2.0'};
expect(processor.shouldProcess(parsedObject)).toEqual(true);
});
});
describe('tryGetVersionOfDocument()', () => {
const processor = new AsyncAPIInputProcessor();
Expand Down

0 comments on commit 4ab0052

Please sign in to comment.