docusaurus-openapi-docs icon indicating copy to clipboard operation
docusaurus-openapi-docs copied to clipboard

MDX Compilation failing for swagger

Open Pratosh22 opened this issue 10 months ago • 2 comments

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

  • Swagger Version: 2.0
  • Version used: 3.0.0-beta.8 and Docusaurus 3.2.1
  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3): Node 18, Brave
  • Operating System and version (desktop or mobile): MacOS

Pratosh22 avatar Apr 17 '24 18:04 Pratosh22

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

sserrata avatar Jun 28 '24 15:06 sserrata

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

Pratosh22 avatar Jul 03 '24 05:07 Pratosh22