Skip to content

Schemas in AsyncAPI 3.0.0 file not fully rendered (only example1 parsed correctly) #1154

@juanmbco

Description

@juanmbco

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

  1. 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
  1. Render the spec in the AsyncAPI parser/viewer.
  2. Observe how only example1 is displayed correctly. The schemas for example2 and example3 are either missing or empty.

Image

Troubleshooting
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions