parser-js: AsyncAPI reference to Avro [BUG]
Describe the bug I try to make a reference to an Avro object in AsyncAPI. For development, I used playground.asyncapi.io. When defining a reference to our Kafka Schema Registry, which returns Avro like in your documentation
"Train": {
"name": "Train",
"title": "Train Information",
"summary": "Inform about Trains.",
"schemaFormat": "application/vnd.apache.avro+json;version=1.9.0",
"payload": {
"$ref": "https://schema-registry-dev.app.01d.io.sbb.ch/subjects/kafka.my-schema-value/versions/1#Train"
}
}
the reference gets correctly resolved to
"Train": {
"name": "Train",
"title": "Train Information",
"summary": "Information about trains.",
"payload": {
"subject": "kafka.my-schema-value",
"version": 1,
"id": 1,
"schema":
{
"type": "record",
"name": "Train",
"namespace": "ch.sbb.kafka.platform.model",
"fields": [
{
"name": "model",
"type": "string"
},
{
"name": "manufacturer",
"type": "string"
}
]
}
}
}
this means that the reference itself and the link is working correctly. But when you then check the HTML panel in playground, the payload object is displayed as “”, instead of the object. Do I miss something here or is the playground component broken?
To Reproduce Steps to reproduce the behavior:
- Open playground.asyncapi.io
- Enter an AsyncAPI document with a reference to Avro as described above.
- The reference gets resolved automatically.
- Check right HTML panel for the operation that included the reference. Payload is “” instead of the object.
Expected behavior Object is being displayed in JSON.
Screenshots I have a screenshot. How do I add it to this bug report?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (9 by maintainers)
I just updated playground.asyncapi.io to have support for Avro schemas. Feel free to try it!
Example document:
This is the package doing the magic: https://github.com/asyncapi/avro-schema-parser.
I’m closing this issue but feel free to open new ones on the Avro Schema Parser repo.