Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: re add protobuff parser #758

Merged
merged 3 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading