swagger-api / swagger-api/swagger-ui

Allow more selective configuration on where syntax highlighting should be used

Open
#7,642 2 comments 5 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

Is your feature request related to a problem?

We use OpenAPI for an API which does some backend calculations and deliver a result to the frontend based on its request.

The request is relatively small. Especially when you manually enter it in the "Try it out" mode. Also the example for the response is pretty small. The only thing that is really huge is the actual response if it comes from the server.

I really like to have syntax highlighting for as much as possible. It makes reading the JSON much easier. But for the big response JSON the whole syntax highlighting process just takes way too long. This is the reason why I currently have syntax highlighting completely off. Usability is more important than nice look.

Describe the solution you'd like

It would be great if enabling or disabling syntax highlighting was more selective. Actually I want to disable it for the result in "Try it out" only as that's what takes too long. Everywhere else I would love to have some syntax highlighting.

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 by tracing how syntax highlighting is configured and applied to the Try it out response and to the smaller request and example views. Define a selective setting that disables highlighting only for large result responses while retaining it elsewhere, then verify the behavior with representative small and large JSON responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.