From ebc39f4a4efa8e29e93a40113ac2a21f7720096a Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Thu, 16 Nov 2023 14:45:13 +0100 Subject: [PATCH] feat(editor-preview-asyncapi): add support for protobufs --- package-lock.json | 1 + package.json | 1 + src/plugins/editor-preview-asyncapi/actions.js | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 578227578cf..12e6db1ad84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@asyncapi/avro-schema-parser": "^1.1.0", "@asyncapi/openapi-schema-parser": "^2.0.3", "@asyncapi/parser": "^1.18.1", + "@asyncapi/protobuf-schema-parser": "^1.0.0", "@asyncapi/react-component": "=1.0.0-next.48", "@babel/runtime": "^7.23.2", "@braintree/sanitize-url": "^6.0.3", diff --git a/package.json b/package.json index 3ace746660e..dcb99a11dfb 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "dependencies": { "@asyncapi/avro-schema-parser": "^1.1.0", "@asyncapi/openapi-schema-parser": "^2.0.3", + "@asyncapi/protobuf-schema-parser": "^1.0.0", "@asyncapi/parser": "^1.18.1", "@asyncapi/react-component": "=1.0.0-next.48", "@babel/runtime": "^7.23.2", diff --git a/src/plugins/editor-preview-asyncapi/actions.js b/src/plugins/editor-preview-asyncapi/actions.js index 62bec928f2b..aa7fb8695b8 100644 --- a/src/plugins/editor-preview-asyncapi/actions.js +++ b/src/plugins/editor-preview-asyncapi/actions.js @@ -2,12 +2,14 @@ import ShortUniqueId from 'short-unique-id'; import { parse as parseAsyncAPIDefinition, registerSchemaParser } from '@asyncapi/parser'; import * as openapiSchemaParser from '@asyncapi/openapi-schema-parser'; import * as avroSchemaParser from '@asyncapi/avro-schema-parser'; +import * as protobufSchemaParser from '@asyncapi/protobuf-schema-parser'; import * as ramlSchemaParser from './util/raml-1-0-parser.js'; registerSchemaParser(openapiSchemaParser); -registerSchemaParser(ramlSchemaParser); registerSchemaParser(avroSchemaParser); +registerSchemaParser(protobufSchemaParser); +registerSchemaParser(ramlSchemaParser); /** * Action types.