Questions tagged [swagger-ui]

Swagger UI is a collection of HTML, CSS and JavaScript objects that dynamically generate documentation from a Swagger-compliant API

Swagger UI is part of the Swagger project.

It adds form to your APIs by making them look good and presentable so that client code can be written easily, at the same time it also makes documentation easier by integrating it with code.

It originated out of the Open API Specification. The source can be found here.

A sample Swagger UI can be found at the Pet Store.

4353 questions
2
votes
2 answers

Override base url in swagger UI

Our service has two instances. Live is operational and has the URL .../bazaar and beta is for public testing and has the URL .../betabazaar. We deployed a Swagger UI instanze and changed the url to fetch .../betabazaar/swagger.json which works. But…
user1482309
  • 289
  • 3
  • 16
2
votes
2 answers

Displaying line breaks in the response text

I use Swagger UI v2.2.0. I have a RESTful method which returns plain text. I want to display this text with line breaks. At the moment, the returned text contains new line characters, but they are displayed as \n. The Content-Type response header is…
Alexey
  • 2,542
  • 4
  • 31
  • 53
2
votes
1 answer

Swagger-ui does not display my minimum and maximum values for the "limit" query parm?

Here is how the JSON object looks like and I can not get maximum and minimum values for the limit query part displayed: "parameters": [ { "name": "limit", "in": "query", "description": "How many items to return…
MIKE
  • 95
  • 1
  • 3
  • 9
2
votes
2 answers

Swagger definition not displaying as expected

I have the following piece of code and swagger is not showing up the way i expect on swagger ui. I'm using annotations to build the swagger definition. I tried using @API and @JsonIgnore. Both did not work for me. import…
user2352834
  • 69
  • 1
  • 2
  • 8
2
votes
0 answers

Can swagger handle case sensitive getters?

I seem to be having a problem with case insensitivity. I have a class with two methods whose names differ only in case that causes the scanner to have problems. More specifically, I have a response class for my REST API: public interface Job { …
mdhirsch
  • 861
  • 7
  • 7
2
votes
0 answers

How can I define a dynamic array of objects in FormData in Swagger?

For instance, if you wanted an endpoint: POST /products that could accept multiple "products" to add to a catalog or something, you could create an HTML form that looked like this:
Keith
  • 4,144
  • 7
  • 25
  • 43
2
votes
0 answers

show an example model for Map in swagger for java endpoint

I have @POST @Path("/path-to-call") @Timed @ActionRequired("my path-to-call") @ApiOperation("description of call") @Produces(MediaType.APPLICATION_JSON) public Response processmyCall(Map requestBody) throws Exception{ but swagger…
f1wade
  • 2,877
  • 6
  • 27
  • 43
2
votes
0 answers

Define array of different objects with max count 5 in swagger

I have completed a Node.js app using LINE APIs.I have the following request object. How can I define the array of different objects, here the messagesfield which contains different object structure for different message types. I hope swagger permits…
Nidhin David
  • 2,426
  • 3
  • 31
  • 45
2
votes
2 answers

Swagger-UI Maximum call stack size exceeded -> Backreference

When calling my swagger.json from the swagger-ui I get an error: Maximum call stack size exceeded I guess it is because I have Token which has an owner of Type User User which has a Token of Type Token When using the online-version of the swagger…
G-M
  • 296
  • 1
  • 6
  • 15
2
votes
4 answers

Swagger ui is not loading swagger api json

I have made api documention with the help of swagger-editor. Now I want see it graphically with the help of swagger-ui. I have deployed my json here https://powerful-escarpment-92284.herokuapp.com/swagger.json Now When I am trying to access it then…
N Sharma
  • 33,489
  • 95
  • 256
  • 444
2
votes
1 answer

Spring boot with SpringFox Swagger UI Generates all Verbs

I enabled API documentation using Swagger 2.6.1 in my spring boot app. The page(swagger-ui.html) loads fine but controller documentation contains all the verbs(PUT, GET, PATCH, POST, etc) even if my controller only has a GET operation. How can I…
alltej
  • 6,787
  • 10
  • 46
  • 87
2
votes
0 answers

How to create a custom layout/theme for swagger-ui 3.x

I would like to create a custom theme (and maybe later a layout) for Swagger-ui 3.x. Being unfamiliar with React i have a hard time finding the right starting point. Can anybody point me in the right direction?
thumbsup
  • 431
  • 5
  • 11
2
votes
1 answer

Swagger: How to get formatted example json

I'm really struggling to understand the format of the examples section of a response. I have the following response defined for a 500 Internal Sever error. 500InternalServerError: description: The server encountered an unexpected condition which…
SynackSA
  • 855
  • 1
  • 12
  • 35
2
votes
1 answer

@ApiResponses and @ApiResponses in swagger

I have annotated my method like, @ApiOperation( value = "Get time spent on category", response = CategoryBean.class, responseContainer = "List", notes = "API to get the time spent on all tasks based on category" ) @ApiImplicitParams( { …
Virat
  • 551
  • 4
  • 9
  • 23
2
votes
0 answers

Conditional Query Parameters in Swagger

I'm working with Swagger Editor to create an API, and in implementing a search endpoint, I am trying to do something like this: /pets: get: summary: Retrieve a list of pets description: Retrieve a list of pets based on search…
Chris
  • 322
  • 1
  • 9