Skip to content

Commit

Permalink
Feat: re add protobuff parser
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenRover committed Sep 6, 2023
1 parent 92807d1 commit 7480f0c
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 37 deletions.
81 changes: 49 additions & 32 deletions library/package-lock.json

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

2 changes: 1 addition & 1 deletion library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
"dependencies": {
"@asyncapi/avro-schema-parser": "3.0.3",
"@asyncapi/openapi-schema-parser": "3.0.4",
"@asyncapi/protobuf-schema-parser": "3.0.0",
"@asyncapi/parser": "^3.0.0-next-major-spec.1",
"@asyncapi/protobuf-schema-parser": "1.0.0",
"highlight.js": "^10.7.2",
"isomorphic-dompurify": "^0.13.0",
"marked": "^4.0.14",
Expand Down
6 changes: 2 additions & 4 deletions library/src/helpers/parser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Parser as AsyncapiParser, fromURL } from '@asyncapi/parser';
import { OpenAPISchemaParser } from '@asyncapi/openapi-schema-parser';
import { ProtoBuffSchemaParser } from '@asyncapi/protobuf-schema-parser';
import { AvroSchemaParser } from '@asyncapi/avro-schema-parser';
// @ts-ignore
import protoSchemaParser from '@asyncapi/protobuf-schema-parser';

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

Expand All @@ -11,8 +10,7 @@ import { VALIDATION_ERRORS_TYPE } from '../constants';
const asyncapiParser = new AsyncapiParser();
asyncapiParser.registerSchemaParser(OpenAPISchemaParser());
asyncapiParser.registerSchemaParser(AvroSchemaParser());
// Waiting for schema parser to be upgraded
// asyncapiParser.registerSchemaParser(protoSchemaParser);
asyncapiParser.registerSchemaParser(ProtoBuffSchemaParser());

export class Parser {
static async parse(
Expand Down

0 comments on commit 7480f0c

Please sign in to comment.