React component for rendering documentation from your specification in real-time in the browser. It also provides a WebComponent and bundle for Angular and Vue
asyncapi: 3.0.0
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user signups
channels:
user/signedup:
address: user/signedup
messages:
subscribe.message:
$ref: '#/components/messages/TradeMessageServer'
components:
messages:
TradeMessageServer:
name: Trade Message (server)
title: Trade Message (server)
description: A message containing trade data
x-something:
$ref: '#/components/messages/TradeMessageServer' #RECURSION IS HAPPENING HERE !!!
3.
![image](https://github.com/user-attachments/assets/6b6eed06-72b0-439e-99ce-db547370d11d)
the error in console
![image](https://github.com/user-attachments/assets/010a267b-fcc4-43c5-896f-6e1d924c3e72)
Now Since studio fetches the document from localstorage before loading. Even if you reload the site it keeps on crashing again and again. Only way to recover is to clear the localstorage and start again with all the progress lost.
**Expected result**
Application should not crash into an unrecoverable state.
The problem is in the recursion found in this [function](https://github.com/asyncapi/asyncapi-react/blob/4253f295a2a4bb753f616d2d54ccfac41048ab5d/library/src/helpers/schema.ts#L521-L564) which doesnt have a recursion limit
**Related Issues:**
https://github.com/asyncapi/studio/issues/771
Description As described in this issue https://github.com/asyncapi/studio/issues/771
when a document has got recursion in it
the rendering crashes due to too many recursion.
This causes the app to go into unrecoverable error.
Steps to reproduce:
components: messages: TradeMessageServer: name: Trade Message (server) title: Trade Message (server) description: A message containing trade data x-something: $ref: '#/components/messages/TradeMessageServer' #RECURSION IS HAPPENING HERE !!!