Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax Highlighting Inconsistent #7182

Closed
jaydreyer opened this issue Apr 14, 2021 · 3 comments
Closed

Syntax Highlighting Inconsistent #7182

jaydreyer opened this issue Apr 14, 2021 · 3 comments

Comments

@jaydreyer
Copy link

jaydreyer commented Apr 14, 2021

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome
  • Version: swagger-react 3.46.0
  • Swagger/OpenAPI version: [OpenAPI 3.0]

Content & configuration

Screen Shot 2021-04-14 at 3 06 08 PM

Describe the bug you're encountering

See screenshot. Some (but not all!) of our specs have strange syntax highlighting, and I cannot figure out what is causing it. In the screenshot above, you can see the request body changes colors all over the place but the response does not. The spec being used in the example above is 3.0.3. We are using swagger-ui-react v.3.46.0.

I've seen some other issues about this, but not much in the way to how to fix it. I'm not sure if this is a bug or something we're doing wrong on our end. The specs we're using are valid. Some are 2.0 and others are 3.0.x. I cannot give out access to our site, unfortunately.

Expected behavior

Syntax highlighting should be consistent across request and response bodies.

@mathis-m
Copy link
Contributor

@jaydreyer could you describe the main differences between the specs that are having wrong behavior vs those that work correctly.
I have tried some things but I could not reproduce this with the specs I have tried:

https://editor.swagger.io/?url=https://gist.githubusercontent.com/mathis-m/d41eaa3316c4ec3d82421a5b75be6c03/raw/fd325774e760e8fabc9695d7b86b978fc754975e/atrurx3qyn.txt

@hkosova
Copy link
Contributor

hkosova commented May 20, 2021

@jaydreyer can you please try the latest version - 3.49.0? A similar issue with highlighting (#6508) was fixed in 3.48.0.

@jaydreyer
Copy link
Author

Sorry for the long delay in replying. I installed 3.52 today and the problem is gone. Thank you, @hkosova and @mathis-m !

@char0n char0n closed this as completed Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants