diff --git a/package-lock.json b/package-lock.json index 8227f2b94ae..e779e02c882 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@asyncapi/openapi-schema-parser": "^3.0.3", "@asyncapi/optimizer": "^0.2.1", "@asyncapi/parser": "^2.1.0", + "@asyncapi/protobuf-schema-parser": "3.0.0", "@asyncapi/raml-dt-schema-parser": "^4.0.3", "@asyncapi/studio": "^0.17.3", "@oclif/core": "^1.26.2", diff --git a/package.json b/package.json index dcb12f50548..6a195246171 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@asyncapi/optimizer": "^0.2.1", "@asyncapi/parser": "^2.1.0", "@asyncapi/raml-dt-schema-parser": "^4.0.3", + "@asyncapi/protobuf-schema-parser": "3.0.0", "@asyncapi/studio": "^0.17.3", "@oclif/core": "^1.26.2", "@oclif/errors": "^1.3.6", diff --git a/src/global.d.ts b/src/global.d.ts index ac3f42f6b27..c1ce8ec908d 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -3,3 +3,4 @@ declare module '@asyncapi/specs'; declare module '@asyncapi/openapi-schema-parser'; declare module '@asyncapi/avro-schema-parser'; declare module '@asyncapi/raml-dt-schema-parser'; +declare module '@asyncapi/protobuf-schema-parser'; diff --git a/src/parser.ts b/src/parser.ts index 314ecdb06d9..0a7b3c62dee 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -3,6 +3,7 @@ import { Parser, convertToOldAPI } from '@asyncapi/parser/cjs'; import { AvroSchemaParser } from '@asyncapi/avro-schema-parser'; import { OpenAPISchemaParser } from '@asyncapi/openapi-schema-parser'; import { RamlDTSchemaParser } from '@asyncapi/raml-dt-schema-parser'; +import { ProtoBuffSchemaParser } from '@asyncapi/protobuf-schema-parser'; import { getDiagnosticSeverity } from '@stoplight/spectral-core'; import { html, json, junit, stylish, teamcity, text, pretty } from '@stoplight/spectral-cli/dist/formatters'; import { OutputFormat } from '@stoplight/spectral-cli/dist/services/config'; @@ -26,6 +27,7 @@ const parser = new Parser({ parser.registerSchemaParser(AvroSchemaParser()); parser.registerSchemaParser(OpenAPISchemaParser()); parser.registerSchemaParser(RamlDTSchemaParser()); +parser.registerSchemaParser(ProtoBuffSchemaParser()); export interface ValidationFlagsOptions { logDiagnostics?: boolean;