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 UI redirection from /swagger

I'm using swagger to generate my API documentation (ASP.NET Web API) and it's working but I still have a small issue. My project URL is : http://localhost:55779/MyProject/api (I configured this to have the same kind of URL and the same kind of…
Arcord
  • 1,724
  • 1
  • 11
  • 16
2
votes
0 answers

how to put parameter default value into generated code in swagger

swagger parameter default is not in generated code. for example: paths: /user/refresh.json: post: operationId: refresh description: | By passing in the appropriate options, you can search for available inventory…
王奕然
  • 3,891
  • 6
  • 41
  • 62
2
votes
1 answer

How to return generic types on ProducesResponseType Swagger?

In the below code, you'll see a T type (generic) on the ProducesResponseType, but I'm not able to make it works since it's not a specific type: public class ApiController : ApiBaseController where T : class, IDocument { protected…
Jude
  • 95
  • 1
  • 6
2
votes
0 answers

Trying to understand the Swagger UI integration in JHipster

I do not understand how the Swagger UI integration is done in JHipster because when I copy/paste the code to put it in a different application, it does not work. In the navbar.component.html, when clicking on the API menu, it invokes the router…
agoncal
  • 464
  • 4
  • 14
2
votes
0 answers

Restrict access to swagger-ui on spring-boot

Is there a way to restrict access to swagger-ui with a password on Spring Boot? Is disabling swagger on production with spring profile a preferable way?
gs_vlad
  • 1,409
  • 4
  • 15
  • 29
2
votes
1 answer

How to document multiple content types in successful GET response in swagger

Let's say we have an example json swagger spec: { "swagger": "2.0", "info": { "version": "1.0.0", "title": "Some API" }, "basePath": "/api/v1", "consumes": [ "application/json" ], "produces": [ "application/json", …
2
votes
0 answers

Unable to access Swagger UI from Spring Boot app deployed on External tomcat 7.62 server

Please suggest me what configurations I am missing. My works perfectly when I am running the application locally as a spring-boot jar with mvn spring-boot:run. But when I try to run the application on external tomcat, I am unable to access swagger…
rmysari
  • 21
  • 5
2
votes
2 answers

@ApiParam is not working with springfox swagger 2

i'm using Springfox swagger 2 for my api documentation and i have the following controller: HelloController.java import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import…
elie
  • 197
  • 2
  • 13
2
votes
0 answers

Embed Swagger3/Swagger 3 UI inside a spring web application

I Would like to embed swagger3 and swagger3 UI inside an API REST Web Service. The application web has been developed with spring-boot 1.5.7.RELEASE. Until now, I have used springfox-swagger2 and springfox-swagger-ui to easily achieve the goal. But…
2
votes
0 answers

junit stopped working after adding swagger-ui

I have managed to implement swagger-ui in my project using springfox but after adding these following statements in my spring-config.xml
Elias
  • 130
  • 1
  • 3
  • 13
2
votes
0 answers

Swagger support for documenting workflow

Can Swagger be used to document endpoints in a specific order different than the default, for example the steps in a workflow? The use case is to provide runnable documentation that shows each step in the happy path of a workflow. Users could then…
Chip McCormick
  • 744
  • 4
  • 17
2
votes
2 answers

How do you configure the title, description and license in Springfox Swagger UI?

When you start Swagger UI with Springfox in a Spring Boot app, it looks like this: How do you configure the title and description ("Api Documentation") and the license (Apache 2.0).
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
2
votes
2 answers

Hide return value from a Spring MVC controller in SpringFox 2

I have an async Spring MVC controller that returns Future. SpringFox 2 renders it as this: How do I remove it? Thank you in advance!
2
votes
0 answers

Swagger UI shows no APIs

I have a Spring Boot Gradle project. I added Swagger but I see no APIs in the UI: These are the lines in the build.gradle: compile("io.springfox:springfox-swagger2:2.7.0") compile("io.springfox:springfox-swagger-ui:2.7.0") This is the…
Ido Barash
  • 4,856
  • 11
  • 41
  • 78
2
votes
1 answer

Which OAuth 2.0 flows does Swagger support?

OAuth 2.0 has the following grant types (flows): authorization_code implicit password client_credentials refresh_token Then which of these flows does Swagger support?
user3940641