PaloAltoNetworks / docusaurus-openapi-docs

🦝 OpenAPI plugin for generating API reference docs in Docusaurus v2.
https://docusaurus-openapi.tryingpan.dev
MIT License
587 stars 199 forks source link

MDX Compilation failing for swagger #802

Open Pratosh22 opened 2 months ago

Pratosh22 commented 2 months ago

Describe the bug

Generated MDX from swagger causing MDX Compilation to fail. Throws error Unexpected character&(U+0026) in name, expected a name character such as letters, digits,$, or_; whitespace before attributes; or the end of the tag

Expected behavior

There shouldn't be an error during compilation

Current behavior

Throws the above error, and generated MDX has syntax errors.

Screenshots

Screenshot 2024-04-17 at 11 35 53 PM Screenshot 2024-04-17 at 11 36 19 PM

Your Environment

sserrata commented 4 days ago

Hi @Pratosh22 can you share steps the reproduce of an OpenAPI spec/snippet? Thanks!

Pratosh22 commented 5 hours ago

Hi @sserrata , Please find the OpenAPI spec here. The problem seems to be coming from the object info.description. The HTML tags are not correctly rendered as <> and extra / are being printed, as attached in the issue. error.txt