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
76
votes
4 answers

How to post files in Swagger (OpenAPI)?

I am using Swagger to document my REST services. One of my services requires a CSV file to be uploaded. I added the following to the parameters section in my JSON API definition: { "name": "File", "description": "The file in zip…
CodeGuru
  • 2,722
  • 6
  • 36
  • 52
70
votes
5 answers

Validating JSON against Swagger API schema

I created an API spec from some JSON files and I am trying to test if the files validate against the API spec. There are some good tools to validate against JSON Schema, but I did not have chance to find a tool to validate against specs created in…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
69
votes
12 answers

Spring Boot 3 springdoc-openapi-ui doesn't work

I'm trying to add swagger-ui (OpenAPI 3.0) to a Spring Boot v3 application. I've added the openapi-ui maven dependency, and it should work as per the documentation. org.springdoc
Nadar
  • 1,521
  • 2
  • 11
  • 21
69
votes
6 answers

How to add method description in Swagger UI in WebAPI Application

I am using Swagger as my API tooling framework and it is working out great so far. I just came across this page https://petstore.swagger.io/ and saw how each method has a description. For example, POST: pet/ is described by add a new Pet to the…
Lost
  • 12,007
  • 32
  • 121
  • 193
68
votes
1 answer

List of swagger UI alternatives

Is there any Swagger UI alternatives ? I already know: http://swaggerui.herokuapp.com/#!/pet/addPet http://public.redfroggy.fr/swagger2
Michael Desigaud
  • 2,115
  • 1
  • 15
  • 15
65
votes
9 answers

Remove Basic Error Controller In SpringFox SwaggerUI

Is there a way i can remove the "basic-error-controller" from springfox swagger-ui? Picture:
Rajkishan Swami
  • 3,569
  • 10
  • 48
  • 68
65
votes
6 answers

Why there are no themes for swagger-ui?

I like swagger for documenting Restful APIs very much, especially "Try it out!" button, but swagger-ui interface doesn't look very cool. And I cannot believe there are no templates for such amazing open source tool (or I can't find any)? I don't…
Arūnas Smaliukas
  • 3,231
  • 6
  • 27
  • 46
60
votes
8 answers

Actions require unique method/path combination for Swagger

I have 2 HTTP GET method in same controller and give me this error HTTP method "GET" & path "api/DataStore" overloaded by actions - DPK.HostApi.Controllers.DataStoreController.GetByIdAsync…
user9390243
58
votes
15 answers

Is it possible to add Authentication to access to NestJS' Swagger Explorer

I'm currently using Swagger in my NestJS project, and I have the explorer enabled: in main.js const options = new DocumentBuilder() .setTitle('My App') .setSchemes('https') .setDescription('My App API documentation') …
josec89
  • 1,932
  • 1
  • 16
  • 19
58
votes
1 answer

What is Swagger, Swashbuckle and Swashbuckle UI

This is my understanding: Swagger is a notation/rules to write documentation. But why is it called a framework (like Angular/MVC)? Swashbuckle is a program (JavaScript?) that generates the documentation (based on Swagger rules). Swagger UI…
Blue Clouds
  • 7,295
  • 4
  • 71
  • 112
56
votes
9 answers

How do you turn off swagger-ui in production

I have swagger plugged in to my spring boot application. Spring boot allows you to have property files for each environment that you have. Is there a way to disable swagger for a production environment?
user301693
  • 2,377
  • 7
  • 22
  • 24
54
votes
23 answers

Added Springfox Swagger-UI and it's not working, what am I missing?

Following the instructions here: http://www.baeldung.com/swagger-2-documentation-for-spring-rest-api I added these dependencies to my project: compile "io.springfox:springfox-swagger2:2.7.0" compile "io.springfox:springfox-swagger-ui:2.7.0" and…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
54
votes
3 answers

Keycloak integration in Swagger

I have a Keycloak protected backend that I would like to access via swagger-ui. Keycloak provides the oauth2 implicit and access code flow, but I was not able to make it work. Currently, Keycloak's documentation is lacking regarding which url should…
melistik
  • 541
  • 1
  • 4
  • 4
51
votes
8 answers

How to set Swagger as default start page?

How do I set Swagger as the default start page in ABP template instead of /Account/Login? I'm using ASP.NET MVC 5.x + Angular 1.x. Update Current code: public static void RegisterRoutes(RouteCollection routes) { …
50
votes
25 answers

Springfox swagger-ui.html unable to infer base URL - Caused by missing cookies

We have our Spring Boot services behind an API Gateway. With an earlier version of Springfox - 2.1.2 we had no issues in loading the swagger-ui.html page. This worked with Spring Boot 1.4.3.RELEASE. From then, we have upgraded to Boot 1.5.7 and…
Arnab Gupta
  • 677
  • 1
  • 5
  • 9