Questions tagged [springfox]

The Springfox suite of java libraries is all about automating the generation of machine and human readable specifications for JSON APIs written using the spring family of projects.

The Springfox suite of java libraries is all about automating the generation of machine and human readable specifications for JSON APIs written using the spring family of projects. Springfox works by examining an application, once, at runtime to infer API semantics based on spring configurations, class structure and various compile-time java annotations.

Useful links

794 questions
8
votes
6 answers

Generate webservice description with Swagger in Spring Webflux

Has someone a solution to describe webservice using Swagger library in a Spring webflux environment? The goal is to use Swagger to generate the ws client stubs automatically.
Jimmy Pannier
  • 261
  • 1
  • 2
  • 16
8
votes
3 answers

Swagger - spring fox - hide password

Swagger - spring fox - hide password. In one of our API I need to return alphanumeric code after verifying user id and password. We are using springfox-swagger-ui-2.3.1.I have a field "password" where I do not want to show password (instead i want…
Ashish S
  • 141
  • 1
  • 7
8
votes
2 answers

Springfox Swagger adding response status 200 to POST and PUT

I am using springfox-swagger2 version 2.6.1, and it is inserting HTTP 200 response messages for PUT and POST operations automatically, despite my attempts to configure it not to do so (I do not use response status 200 for POST or PUT, but 201 and…
faucamp
  • 121
  • 1
  • 7
7
votes
1 answer

Multiple swagger-ui html pages in a spring application

I am building an application where I would like to have two swagger urls: http://localhost:8080/order-swagger.ui.html http://localhost:8080/inventory-swagger.ui.html I read many articles but did not find any solution. What I found is that to define…
aliceangel
  • 304
  • 1
  • 5
  • 19
7
votes
1 answer

How to change Swagger UI index.html logo and header contents in Springfox?

I'm documenting my API created using Spring Boot 2.4.3 using springfox-swagger 3.0.0. So I have the below page now. My client wants to change the Swagger UI logo to their own. I'm not able to do so. I have searched and found few solutions and it is…
Avinash
  • 533
  • 5
  • 15
7
votes
1 answer
7
votes
2 answers

How to change the default group / specification in Swagger UI?

The Swagger documentation in my project has multiple groups. There is a Docket for each group and the endpoints (members of each group) are marked with a custom annotation. For example here is the Docket for authentication group: @Bean public Docket…
Vladas Maier
  • 2,054
  • 2
  • 22
  • 34
7
votes
3 answers

How to configure springfox to unwrap reactive types such as Mono and Flux without having to explicitly specify response type in @ApiResponse

I'm using springfox 3.0.0 for reactive support, and am using @EnableSwagger2WebFlux on my swagger config. My swagger config is as follows: @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) …
adnan_e
  • 1,764
  • 2
  • 16
  • 25
7
votes
1 answer

How do I make Swagger-UI use a YAML/JSON rather than having to put annotations on my REST controller?

I am used to adding annotations on my REST controllers for Swagger-UI to use. However, I would prefer to point Swagger-UI at a YAML file which describes my REST controller. An example of what I want to do is shown below.…
buratino
  • 1,408
  • 2
  • 17
  • 40
7
votes
2 answers

How fix "Security scope definition global could not be resolved" in springfox?

I am using springfox for generating swagger documentation from spring controllers. When visit http://127.0.0.1:8080/mycontextroot/swagger-ui.html I got swagger UI which works! But when I try to open same yaml (or json) file generated from…
Cherry
  • 31,309
  • 66
  • 224
  • 364
7
votes
1 answer

How to upload multiple files using swagger-ui (springfox-swagger2 and springfox-swagger-ui) and spring-boot application?

I have to upload multiple file of type MultipartFile from swagger to test my api. Postman does allow to upload, however, same thing is not working in swagger. Code for list of multipart file: @ApiParam(name = "file", value = "Select the file to…
Pati Ram Yadav
  • 815
  • 1
  • 8
  • 22
7
votes
1 answer

Polymorphism with swagger not working as expected

I am using springfox version 2.9.2 and swagger annotations 1.5.x. The ApiModel annotations support the discriminator, subTypes and parent attribute which are required to make polymorphism work but I am not seeing the correct apidocs generated to…
Moiz Raja
  • 5,612
  • 6
  • 40
  • 52
7
votes
2 answers

Document QueryDSL endpoint with Swagger

I'm using Spring Boot Data, QueryDSL and Swagger. I've define endpoint like this: @GetMapping public ResponseEntity listOfThings( @PageableDefault(size = 20, sort = "uID", direction = Sort.Direction.DESC) final Pageable pageable, …
Marx
  • 804
  • 10
  • 23
7
votes
1 answer

SpringFox Swagger and LocalTime

Anybody knows how to format LocalTime in Springfox? Converting to ISO format works for LocalDate with this setting to ObjectMapper .featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) But for LocalTime I'm still getting this in…
Zveratko
  • 2,663
  • 6
  • 35
  • 64
7
votes
6 answers

Can't access API's documentation with JHipster

I've been trying to access the generated Swagger-UI of a JHipster generated Spring app. I've tried to access through "/swagger-ui.html" as that worked out just fine with other projects, but not this time. I've also looked up the security…
Unai P. Mendizabal
  • 174
  • 1
  • 1
  • 6