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
0 answers

Swagger documentation for conditionally required

I'm trying to document my java APIs using Swagger plugin in gradle with : "compile "io.swagger:swagger-annotations:1.5.0". I am using @ApiModelProperty annotation to achieve attribute's description, in my static html document. I have a common DTO…
Rohit Bagjani
  • 1,264
  • 2
  • 11
  • 14
2
votes
1 answer

Swagger configured in Spring Boot shows only methods with POST and GET mapping

Swagger configured in Spring Boot shows only one method with POST mapping and one method with GET mapping from every controller. Swagger ignores another methods with GET and POST mapping and ignores all methods with PUT and DELETE mappings. My…
Artiom Saidanov
  • 286
  • 1
  • 3
  • 13
2
votes
2 answers

How to get drop down for possible values in swagger

Hi I have Rest API and used swagger for the test this API. below is one of my API. @RequestMapping(value = "/api/test", method = RequestMethod.POST) public void test(String string){ // body } The Possible value for the arguments are "Database"…
Sagar Vaghela
  • 1,165
  • 5
  • 20
  • 38
2
votes
0 answers

Swagger-ui 3.x not creating index.html after building dist

I'm trying to using swagger-ui to document my node.js API. I have cloned the latest repository (3.x) into my repository. When i run sudo npm run build to create the dist folder, it generates several files but it doesn't create index.html . The files…
2
votes
1 answer

Swagger Annotations for Customizing Responses?

Have a custom response setup like this: public class CustomResponse { private int id; private String productName; private int quantity; private double price; // Constructor & along with Getters & Setters } My Swagger inside my…
PacificNW_Lover
  • 4,746
  • 31
  • 90
  • 144
2
votes
2 answers

Jhipster Swagger configuration

How to override Jhipster swagger configuration in a microservice project to change the /api path in the backend and update gateway Swagger UI accordingly ?
freemanpolys
  • 1,848
  • 20
  • 19
2
votes
0 answers

Basic authentication for Swagger-UI not working correctly

I have setup Swagger within my ASP.NET project using NSwag which works fine but I am attempting to add support for authentication. My authentication model is a simple username/password that uses OAuth using ApplicationOAuthProvider The URL I use to…
Chris
  • 26,744
  • 48
  • 193
  • 345
2
votes
1 answer

Server response is empty on Swagger UI

I have a REST API that is integrated with Swagger UI. However, when I try to execute a request from Swagger UI, the interface only shows me the curl command but provides no server response. The curl command returns the expected response when run…
Shuklaswag
  • 1,003
  • 1
  • 10
  • 27
2
votes
0 answers

Enabling OAuth Flow in SwaggerUI

Spent the last day or so getting SwaggerUI to work with a OAuth2 authentication flow. Seems like Im almost there but on the return redirect from Oauth provider (Microsoft Azure AD) i get a - JavaScript runtime error: Unable to get property…
David
  • 1,131
  • 9
  • 22
2
votes
2 answers

Swagger-UI not appearing properly

Why does my Swagger UI look different? This is what I have: This is what I would like to have: In order to get Swagger-UI working, all i did was download the project(https://github.com/swagger-api/swagger-ui), take all the contents in the dist…
BigBug
  • 6,202
  • 23
  • 87
  • 138
2
votes
2 answers

Swagger UI doesn't support uploading a file properly for RestEasy

I use a JAX-RS (RestEasy) along with a Swagger. One of my endpoint can upload a file. Defined way to upload the file (in RestEasy) is to provide a org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput as a parameter. Here is my…
Robert
  • 762
  • 2
  • 10
  • 23
2
votes
2 answers

Not able to run Swagger UI

I have a .NetCore Web API project. And I am trying to use Swagger on it. All the configuration looks good but when I run my project I got an 404 error, page not found. Here is my code: public void ConfigureServices(IServiceCollection services) …
2
votes
0 answers

Tapestry 5.4: how to use an external dist package?

I'd like to use the dist package from swagger-ui to be able to expose my webservice. The dist pkg is located here: https://github.com/swagger-api/swagger-ui/tree/master/dist While I can use this: Swagger UI with Tynamo Resteasy for Tapestry 5.4 to…
labheshr
  • 2,858
  • 5
  • 23
  • 34
2
votes
2 answers

How to get Swagger to send api_key in Header and in request URL?

I am able to either get the API key to be represented as a header or as a tag on the end of the URL, but I am needing it to be both. Is there any way for this to be possible? The picture is linked
tdmiller
  • 2,102
  • 2
  • 13
  • 28
2
votes
1 answer

JSON/Nodejs/swagger: Newlines not translated to multi-line in strings of express response displayed in swagger

I am working on a nodejs server sending back JSON as responses via an express reference and displaying to swagger ui client for display. Some of these responses can be log and might contain error stack so I wanted to display the stack in…
Ulysses
  • 5,616
  • 7
  • 48
  • 84