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
28
votes
7 answers

How to remove controller list from Swagger UI

I'm using springfox-swagger-ui 2.8.0 which ships with Swagger UI 3.7.0. I want to get rid of the controller list in front of the api documentation page, pretty useless for me (every tab is empty). I've already tried to annotate the controller class…
think01
  • 681
  • 1
  • 10
  • 22
28
votes
10 answers

How to fully disable swagger-ui in spring-boot?(/swagger-ui.html should return 404)

I have read following topic: Disabling Swagger with Spring MVC and I wrote: @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() …
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
27
votes
4 answers

Can Swagger be used for SOAP?

I was exploring Swagger and I must acknowledge I'm loving it. I understand Swagger is primarily for RESTful web services, but I was wondering if we can make it work with SOAP web services as well. May be translate SOAP based web services to RESTful?…
pavanlimo
  • 4,122
  • 3
  • 32
  • 47
26
votes
2 answers

How to reference array item examples in OpenAPI 3?

Using this schema definition: schemas: AllContacts: type: array items: $ref: '#/definitions/ContactModel1' example: - id: 1 firstName: Sherlock lastName: Holmes - id: 2 firstName: John …
Old Man Walter
  • 629
  • 2
  • 7
  • 16
26
votes
7 answers

How to include XML comments files in Swagger in ASP.NET Core

I need Swagger generate API documentation include UI to test operations. When use ASP.NET in my project, deps XML files are generated, everything is OK, look like this: But when I use ASP.NET Core in my project, deps XML files are not generated. It…
Swire
  • 363
  • 1
  • 3
  • 5
25
votes
7 answers

springboot swagger3 "Failed to load remote configuration."

Spring Boot 2.6.3 with Springdoc. org.springdoc springdoc-openapi-ui 1.6.5 In applicaton.yaml, when I set…
QiangLi
  • 251
  • 1
  • 3
  • 3
25
votes
1 answer

Is it possible to be in try-it-out mode by default in Swagger 2?

I am using Swagger 2 with Springfox. When you click on an endpoint, is there any way to have the Try-it-out mode activated by default, without having to click this button:
Thomas
  • 1,491
  • 13
  • 23
25
votes
1 answer

Multi-level (nested) tagging in Swagger UI

I just started working on Swagger 2.0 API recently. I am looking for some ways to organize the API documentation. Currently I'm using the @Api(tags = {"Heading1"}) Java annotation to tag each API. The generated documentation looks…
kani mozhi
  • 251
  • 1
  • 3
  • 3
25
votes
4 answers

Add a header parameter in Swagger UI documentation with Springfox

I want to add a header parameter field in the auto-generated swagger ui documentation of my rest service. I use Spring and Springfox. public ResponseEntity saveNewUser( @ApiParam(value = "the user to create", required = true)…
Julien
  • 2,616
  • 1
  • 30
  • 43
25
votes
6 answers

Unable to bring up swagger-ui from spring-boot application

I have a spring boot application that i am running using embedded tomcat server. I am partially successful in getting springfox-swagger integrated with the app. If i do a /v2/api-docs , i am able to see all the documentation of all the api's in the…
Naveen Chandra
  • 281
  • 1
  • 4
  • 5
25
votes
3 answers

Swagger API which is having query string

I want to deploy an API which is having query string.This is the API v1/products?q=circuit breaker&locale=en-GB&pageSize=8&pageNo=1&project=GLOBAL Here is how i am…
schneider
  • 273
  • 1
  • 3
  • 8
24
votes
6 answers

How to hide the Models section in Swagger UI?

I use Swagger UI to display API documentation. By default, it displays the "Models" section at the bottom: How to hide it?
02040402
  • 729
  • 3
  • 6
  • 21
24
votes
2 answers

Swagger UI configuration with swagger-config.yaml

As per swagger documentation, Swagger-UI accepts configuration parameters in four locations. From lowest to highest precedence: The swagger-config.yaml in the project root directory, if it exists, is baked into the application configuration object…
Mahendra Kapadne
  • 426
  • 1
  • 3
  • 10
24
votes
4 answers

What is the correct way to download a file via the NSwag Code Generator (angular 2 typescript)

I try to download a file via an angular 2 typescript client. The link generated in Swagger UI works fine, but the generated typescript client does not. The controller looks like this: [HttpGet("export")] [SwaggerResponse((int)…
lama
  • 362
  • 1
  • 2
  • 9
24
votes
8 answers

Unable to get Swagger UI working with Spring boot

I am trying to get Swagger UI working with Spring Boot 1.2.1. I followed the instructions at https://github.com/martypitt/swagger-springmvc and I added @EnableSwagger on my spring config. I currently get back JSON when I go to…
Wim Deblauwe
  • 25,113
  • 20
  • 133
  • 211