-
-
Notifications
You must be signed in to change notification settings - Fork 149
Description
Description
Hi guys!
There is an issue rendering the schemas declared in an AsyncAPI 3.0.0 document. For the following specification, only example1
is correctly parsed and displayed; however, example2
and example3
do not show the specific schema structure, and their definitions are missing or unresolved in the rendered output.
This appears to be a problem with how nested or referenced Avro schema types are handled—particularly when the type is declared as a named reference (example.field.ExampleField), rather than defined inline.
Thanks in advance.
Best regards,
Juan
Expected result
All three fields (example1, example2, example3) should resolve to the ExampleField schema and display the field structure correctly.
Actual result
-
example1: Parsed and rendered correctly.
-
example2: Schema is not correctly displayed.
-
example3: Schema is not correctly displayed.
Steps to reproduce
- Use the following AsyncAPI file as input:
asyncapi: 3.0.0
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user signups
channels:
example:
address: example
messages:
ExampleEvent:
$ref: '#/components/messages/ExampleEvent'
operations:
sendUserSignedup:
action: send
channel:
$ref: '#/channels/example'
messages:
- $ref: '#/channels/example/messages/ExampleEvent'
components:
messages:
ExampleEvent:
name: ExampleEvent
title: Example Event
summary: Contains the event type some data
contentType: application/avro
payload:
schemaFormat: "application/vnd.apache.avro+json;version=1.9.0"
schema:
name: Example
namespace: example.message
type: record
fields:
- name: example1
type:
type: array
items:
name: ExampleField
namespace: example.field
type: record
fields:
- name: test
type: string
- name: example2
type:
type: array
items: example.field.ExampleField
- name: example3
type: example.field.ExampleField
- Render the spec in the AsyncAPI parser/viewer.
- Observe how only example1 is displayed correctly. The schemas for example2 and example3 are either missing or empty.
Troubleshooting
N/A