swagger-api / swagger-api/swagger-ui

OpenAPI 3.1.0 support: syntaxHighlight.activate: false not working on schema

Open
#9,049 1 comment 0 reactions 0 assignees View on GitHub

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
    }
  }
}

Screenshot 2023-07-20 at 4 23 31 PM

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.