asyncapi-react icon indicating copy to clipboard operation
asyncapi-react copied to clipboard

Cannot read properties of undefined (reading '0') on docusaurus

Open Streeterxs opened this issue 1 year ago • 5 comments

using docusaurus with asyncapi returns Error: Cannot read properties of undefined (reading '0') error.

I made a repo to reproduce https://github.com/Streeterxs/test-docusaurus

Streeterxs avatar May 19 '23 19:05 Streeterxs

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

github-actions[bot] avatar May 19 '23 19:05 github-actions[bot]

It is hard to say what is the solution as I'm not docusaurus maintainer and do not have capacity to dig into it. We are for sure accepting PRs

derberg avatar May 23 '23 13:05 derberg

I can reproduce it with:

Put following schema to: https://asyncapi.github.io/asyncapi-react/

asyncapi: 2.6.0
info:
  title: runtime-v2-prod
  version: 3.0.6-SNAPSHOT
  description: demo
defaultContentType: application/json
channels:
  tms/capacityplanner/trip/p/v2/paths/find/in:
    description: |
      STAGE PROD: Trip Runtime Calculation
    publish:
      bindings:
        solace:
          destinations:
            - destinationType: topic
              topicSubscriptions:
              - tms/capacityplanner/trip/p/v2/paths/find/in
      message:
        $ref: '#/components/messages/TodoReplaceMeSometimePleaseMessage'
components:
  messages:
    TodoReplaceMeSometimePleaseMessage:
      description: |
        This is a place holder. Will be replaced with a real schema in the future.
      contentType: application/json
      payload:
        $ref: 'https://gist.githubusercontent.com/GreenRover/6aaa6727aaf6cca65c12464a8ff388f0/raw/1c10fbb77cc2870b221da72f7a27c0a6f486b3ad/kafka-schema-example.json#/definitions/CorridorConflict'

Expected: Schema will be displayed as with https://studio.asyncapi.com/

GreenRover avatar Sep 03 '23 09:09 GreenRover

In next branch it works.

GreenRover avatar Sep 05 '23 12:09 GreenRover

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jan 04 '24 00:01 github-actions[bot]