swagger-api / swagger-api/swagger-ui

Swagger-ui not showing example for query parameter

Open
#7,635 1 comment 1 reaction 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

Hello,

I'm working on a Rest API using java 7 and Spring. I have a Swagger documentation using library swagger-jersey2-jaxrs to generate my swagger.json.
To display it, i'm using Swagger-ui from the dist repository (https://github.com/swagger-api/swagger-ui/tree/master/dist).

My problem is that when i display my Swagger documentation, the query param example isn't and i dont know why. If i try with an "official" json (https://petstore.swagger.io/v2/swagger.json) it is not displayed too.

I have the same behaviour for the query parameter format.

From the https://petstore.swagger.io/ website i have this result (the good one) :
image

And from the swagger-ui from the dist repository
image

Some one know how i can display my query param example and format ?
Is that behaviour a normal thing ?

Thank's for your help

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 Swagger UI dist repository and compare its rendering of the provided Petstore swagger.json with the Petstore website, focusing on the query parameter example and format shown in the screenshots. Reproduce the display and identify whether the dist UI can render both fields; done means the query parameter example and format appear consistently when the same specification is loaded.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.