swagger-api / swagger-api/swagger-ui
OpenAPI 3.1.0 support: syntaxHighlight.activate: false not working on schema
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- OS: mac
- Browser: chrome
- Version: latest
- Method of installation: npm
- Swagger-UI version: 5.0.0
- Swagger/OpenAPI version: 3.1.0
Content & configuration
Setting syntaxHighlight.active to false no longer turns OFF syntax highlighting of schema definitions. The setting does properly turn off highlighting of responses and examples. Unfortunately the performance hit for syntax highlighting schemas is so bad it's completely unusable. This configuration option worked properly prior 5.0.0.
{
swaggerOptions: {
syntaxHighlight: {
activate: false
}
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the swaggerOptions.syntaxHighlight.activate setting and trace how it reaches schema definitions, comparing that path with responses and examples. Reproduce the issue in Swagger UI 5.0.0 using an OpenAPI 3.1.0 document, then add coverage in the relevant existing test area. Done means false disables schema highlighting without changing response or example behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, openapi
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100