You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we try to parse a document containing an schema with, for example, schemaFormat: "application/octet-stream", the parser gives a validation error: Unknown schema format.
E.g.
Error thrown during AsyncAPI document parsing. Name: Error, message: Unknown schema format, stack: Error: Unknown schema format\n'
However, we find the following statement in the spec (same link as above):
Custom values are allowed but their implementation is OPTIONAL.
Expected behavior
Even though no custom schema parser is found for a given schema format, the document should still be valid as long as it is a string
Screenshots
How to Reproduce
import{Parser}from"@asyncapi/parser";constparser=newParser();const{ document, diagnostics }=awaitparser.parse(`asyncapi: 3.0.0info: title: Test custom schema format version: 0.1.0components: schemas: theSchema: schemaFormat: application/octet-stream # This is allowed by the spec schema: true`);if(document){console.log(document.info().title());}else{console.log(diagnostics);}
Describe the bug.
Current supported schema formats are available in https://www.asyncapi.com/docs/reference/specification/v3.0.0#multiFormatSchemaObject.
If we try to parse a document containing an schema with, for example,
schemaFormat: "application/octet-stream"
, the parser gives a validation error:Unknown schema format
.E.g.
However, we find the following statement in the spec (same link as above):
Expected behavior
Even though no custom schema parser is found for a given schema format, the document should still be valid as long as it is a string
Screenshots
How to Reproduce
🥦 Browser
None
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
None
The text was updated successfully, but these errors were encountered: