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

How to configure oAuth2 with password flow with Swagger ui in spring boot rest application

I have spring boot rest api (resources) which uses another spring boot authorisation server, I have added Swagger config to the resource application to get a nice and quick documentation/test platform for the rest API. my Swagger config looks like…
Hasson
  • 1,894
  • 1
  • 21
  • 25
12
votes
1 answer

How to convert Java Swagger Annotation to Swagger json schema?

How to generate JSON file from java files containing Swagger specific annotations, so that Swagger-UI can read it.
Vivek Sinha
  • 1,591
  • 3
  • 15
  • 23
11
votes
1 answer

Changing title and description of Swagger UI using Springfox

I am building a Spring Boot application and documenting it using a Swagger UI using the Springfox Swagger UI. I've got everything documented, but want to customize the title and description but can't figure out how. For example, in this image:…
faiuwle
  • 359
  • 1
  • 3
  • 10
11
votes
2 answers

swagger consolidation for multiple microservices

I have multiple microservices, for which swagger has already been implemented. I would like to bring all the api's under single swagger UI. I've followed the following link for doing this. but tried it in maven approach in STS. Swagger Consilidation…
mike
  • 395
  • 2
  • 4
  • 15
11
votes
4 answers

Customizing Request Header description in Swagger UI using Springfox-Swagger2

I am using Springfox Swagger2 version 2.4.0, Springfox Swagger UI version 2.4.0 and Swagger Annotations version 1.5.0 in my Spring Boot application. The question here is, I am able to generate swagger UI for my controller's API and I am able to test…
Gandhi
  • 11,875
  • 4
  • 39
  • 63
11
votes
2 answers

How to change the response status code for successful operation in Swagger?

As shown in the image, it says "Response Class (Status 200)" for the add operation. However, the add operation has been implemented in such a way that it will never return 200. It returns 201 on success. My question is how can I change the (Status…
Akshay Damle
  • 1,220
  • 3
  • 18
  • 31
10
votes
2 answers

Failed to start bean 'documentationPluginsBootstrapper' Spring boot Swagger implementation using Spring Fox?

I am using springfox-boot-starter dependency for swagger UI in my spring boot application but when I try to run the application I am getting below error Failed to start bean 'documentationPluginsBootstrapper'; nested exception is…
Rajesh kumar
  • 126
  • 1
  • 1
  • 7
10
votes
1 answer

Unable to configure Swagger in Spring project, getting File not found exception

I am trying to configure swagger for my spring application. Below is the configuration. However, getting an error [springfox/documentation/spring/web/SpringfoxWebMvcConfiguration.class] cannot be opened because it does not exist Spring version -…
Syed Irfan
  • 179
  • 1
  • 1
  • 6
10
votes
1 answer

Generate swagger JSON file at compile time for springfox based project

I have working project which is using springfox to generate API documentations. I want to generate swagger.json at compile time. following is sample springfox configuration, @Configuration @EnableSwagger2 public class SwaggerConfig { @Bean …
Mayur
  • 576
  • 2
  • 5
  • 26
10
votes
1 answer

endpoints group by resources swagger annotation?

I'm using Spring for my REST API development. And I have some API where there are lots of endpoints. When I open up swagger ui, it looks to packed. I just read this article and saw that we can group endpoints based on resource level. I just want to…
Supun Wijerathne
  • 11,964
  • 10
  • 61
  • 87
10
votes
6 answers

No operations defined in spec! while specifying multiple paths in swagger ui

I want to display two REST API endpoints in Swagger ui: /cart and /post. When I specify either /cart or /post works fine but with both showing me error as No operations defined in spec! in swagger-ui @Bean public Docket api() { return new…
Navin Gelot
  • 1,264
  • 3
  • 13
  • 32
10
votes
3 answers

Springfox Swagger UI behind reverse proxy

I have configured a Spring Boot application with Swagger API documentation and configured Swagger UI. I also run my backend application behind a reverse proxy that maps all requests from host:port/api to backend_host:port/, when running locally on…
lanoxx
  • 12,249
  • 13
  • 87
  • 142
10
votes
3 answers

Is there a way I can stop springfox swagger from scanning the model classes?

I'm currently using Springfox Swagger to document my spring boot application with a Java config. My API starts in about 75 seconds, (it was originally 20 secs without Springfox) with the whole scanning process. I currently just need the controller…
kugar
  • 129
  • 1
  • 1
  • 6
10
votes
5 answers

springfox(swagger2) does not work with GsonHttpMessageConverterConfig

What I am trying to build is a spring-boot (v1.2.3) application and expose my Rest API with SpringFox(swagger2) v2.0.0 my Swagger Spring config @EnableSwagger2 @Configuration public class SwaggerConfig { @Bean public Docket myApi() { …
Oleg Majewski
  • 989
  • 1
  • 9
  • 13
9
votes
3 answers

Springfox class Parameter is deprecated

In Springfox 3.0, springfox.documentation.service.Parameter is deprecated. Is there a newer way of providing the parameter and its builder? And how to provide its default value?
Muhammad Siddique
  • 960
  • 1
  • 14
  • 31