Skip to content

Does not support avro in AsynApi  #57

Description

@ikanel

Validation fails with the following error when the AsyncApi has an avro schema:

/Users/ikanel/code/SwaggerHub/node_modules/asyncapi-validator/src/Parser.js:27
throw new ValidationError(this._formatError(err), undefined, err.validationErrors)
^

AsyncAPIValidationError: PARSERS[String(...)] is not a function Error Details:
at Parser.parse (/Users/ikanel/code/SwaggerHub/node_modules/asyncapi-validator/src/Parser.js:27:13)
at async ValidatorFactory.fromSource (/Users/ikanel/code/SwaggerHub/node_modules/asyncapi-validator/src/ValidatorFactory.js:13:29)
at async file:///Users/ikanel/code/SwaggerHub/Contracts/AsyncApi/Validator/validate.js:6:10 {
key: undefined,
errors: undefined
}

Node.js v19.2.0

The fragment of the asynApi schema which causes this exception:

channels:
avroExample:
publish:
message:
#see https://github.com/asyncapi/avro-schema-parser
name: avro-message
schemaFormat: 'application/vnd.apache.avro;version=1.9.0'
payload: # The following is an Avro schema in YAML format (JSON format is also supported)
type: record
name: User
namespace: com.company
doc: User information
fields:
- name: displayName
type: string
- name: email
type: string
- name: age
type: int

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions