"Unable to render this definition" error solutions not working #8586
Unanswered
celinehaddad
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Have you managed yo overcome this error? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey swagger team,
I need some help with implementing swagger-ui-react in my Next.js app. I found this issue thread #8245 to solve my initial error message ("SyntaxError: Cannot use import statement outside a module") but I tried this solution and I get this error:
I also noticed that when I change the spec file (was testing json and yml formats if it would behave differently- it doesn't), the spec file didn't change from json to yml based on what I specified..it just kept the first file I tried & I verified this in my console.log. SO, I tried a different solution I found in that issue thread to dynamically import swagger-ui-react, and that solved the "spec file not changing to what I define" issue. But, I still get the same exact error message as pictured above.
My spec file specifies "openapi": "3.0.2" at the top. I tested changing it to "3.0.1" & tested adding "swagger": "2.0" above the openapi version as well, but none of this worked & I still get that error message. I tested this out at https://editor.swagger.io/ & the UI of my openapi spec file renders perfectly.
Not sure what I need to do to get this working as my openapi spec meets the requirements of the error message. Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions