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

Suddenly Springfox Swagger 3.0 is not working with spring webflux

Application was working with Springfox Swagger 3.0 few days back. Suddenly it is stopped working. The Jar file which was created before a week is still working but now when we try to build a new Jar file, which is not working, even without any…
29
votes
3 answers

Any Springfox alternatives out there?

Last two years I worked on Spring Boot Applications with Springfox. Springfox generate a documentation and a test ui for your REST API. This was awesome. But actually Springfox project is dead and do not support the newest Spring. I have three…
Tristate
  • 1,498
  • 2
  • 18
  • 38
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
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
23
votes
6 answers

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.plugin.core.PluginRegistry

i'm migrating a modular app into a microsevrices app using spring cloud, when i finished migrating a module into microservice and ran it a problem came up saying : Correct the classpath of your application so that it contains a single, compatible…
Mena_Mena
  • 243
  • 1
  • 2
  • 5
23
votes
2 answers

Replace @EnableSwagger2 after update to latest version

I migrated to latest springfox-swagger2 version 2.10.0 but looks like @EnableSwagger2 is deprecated. What annotation should I use in order to enable Swagger into Spring Boot project? @EnableSwagger2WebMvc?
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
23
votes
4 answers

Springfox @RestController naming

I'm getting some minor troubles using Springfox. I can't set a name to @RestController classes. I'm using Spring boot and Swagger2. The following code will produce a controller named "rest-status-controller" in springfox ui. I've expected a…
Barium Scoorge
  • 1,938
  • 3
  • 27
  • 48
21
votes
1 answer

Maven: package io.swagger.annotations does not exist

I want to document my project with swagger. I add swagger annotations and io.springfox dependencies to my project but when I run mvn clean package I have a lot of errors: PS D:\parent-project> mvn clean package [INFO] Scanning for projects... [INFO]…
Sotnas
  • 213
  • 1
  • 2
  • 5
21
votes
16 answers

swagger-ui No mapping found for HTTP request

I'm trying to document and existing Rest API a Spring MVC project (NOT spring boot!). My application is called api so http://localhost:9090/api would be the root endpoint. Because I'm using spring-data-rest, on that URL I can see the json of all my…
felipe
  • 1,039
  • 1
  • 13
  • 27
21
votes
5 answers

Swagger + Spring security - Hide methods based on roles

I have an API that has different consumers. I'd like them to get relevant documentation based on their roles in Spring Security. E.g API operation A is constricted to Role A and Role B API operation B is constricted to Role B API operation C is open…
Espen Schulstad
  • 2,355
  • 3
  • 21
  • 32
20
votes
2 answers

swagger date field vs date-time field

I am using swagger to test my rest api, one of the property of my entity class is a date field for which I need the date in yyyy-mm-dd format , but swagger model schema is showing this field as date-time instead of date field, therefore it gives…
Sourav
  • 416
  • 1
  • 5
  • 13
18
votes
2 answers

Are there any advantages of using/migrating to springdoc-openapi from Springfox?

For enabling Swagger in SpringBoot 2.7 what are the advantages/disadvantages of choosing springdoc-openapi over Springfox
Deepjyoti Dutta
  • 201
  • 1
  • 2
  • 7
18
votes
6 answers

How to hide endpoints from Swagger documentation with Springfox

I have a Spring Boot project with next dependency of Springfox: io.springfox springfox-swagger2 2.9.2 compile
Alberto
  • 745
  • 1
  • 6
  • 25
18
votes
1 answer

Swagger / springfox generating response example automatically

Currently using springfox 2.9.2 to Swagger document an API created in Spring. I want to add example response in the documentation, like in this image; my understanding is that I can do something similar to this: @ApiResponses(value = { …
Tlink
  • 875
  • 2
  • 14
  • 30
18
votes
5 answers

Swagger API Operations Ordering

How do I sort my operation by method alphabetically e.g. DELETE, GET, POST, PUT. I have read from this post but it is in HTML but in my case, I have integrated Swagger into Spring Boot so I need to sort it when creating a Docket. Sort API methods in…
Javatar
  • 623
  • 3
  • 8
  • 20
1
2
3
52 53