Skip to content

Commit

Permalink
feat: add protobuff payload support (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenRover authored Jun 12, 2023
1 parent 505304d commit 1ab6b77
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 8 deletions.
90 changes: 82 additions & 8 deletions library/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"dependencies": {
"@asyncapi/avro-schema-parser": "^1.1.0",
"@asyncapi/openapi-schema-parser": "^2.0.1",
"@asyncapi/protobuf-schema-parser": "^1.0.0",
"@asyncapi/parser": "^1.18.0",
"highlight.js": "^10.7.2",
"isomorphic-dompurify": "^0.13.0",
Expand Down
3 changes: 3 additions & 0 deletions library/src/helpers/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import { parse, parseFromUrl, registerSchemaParser } from '@asyncapi/parser';
import openapiSchemaParser from '@asyncapi/openapi-schema-parser';
// @ts-ignore
import avroSchemaParser from '@asyncapi/avro-schema-parser';
// @ts-ignore
import protoSchemaParser from '@asyncapi/protobuf-schema-parser';

import { ErrorObject, ParserReturn, FetchingSchemaInterface } from '../types';

import { VALIDATION_ERRORS_TYPE } from '../constants';

registerSchemaParser(openapiSchemaParser);
registerSchemaParser(avroSchemaParser);
registerSchemaParser(protoSchemaParser);

export class Parser {
static async parse(
Expand Down

0 comments on commit 1ab6b77

Please sign in to comment.