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
134
votes
15 answers

How to configure Spring Security to allow Swagger URL to be accessed without authentication

My project has Spring Security. Main issue: Not able to access swagger URL at http://localhost:8080/api/v2/api-docs. It says Missing or invalid Authorization header. Screenshot of the browser window My pom.xml has the following…
shubhendu_shekhar
  • 1,373
  • 2
  • 9
  • 13
106
votes
15 answers

Spring Boot 2.6.0 / Spring fox 3 - Failed to start bean 'documentationPluginsBootstrapper'

I'm trying to initiate a Spring Boot project using OpenJDK 15, Spring Boot 2.6.0, Springfox 3. We are working on a project that replaced Netty as the web server and used Jetty instead, because we do not need a non-blocking environment. In the code…
jvacaq
  • 1,429
  • 2
  • 12
  • 19
102
votes
34 answers

Failed to start bean 'documentationPluginsBootstrapper' in spring data rest

I am using spring data rest for my application. I am getting following error and application doesn't get started when I add this method in repository:- Method:- @Modifying @Transactional @Query("from employee as ft where ft.company.id = ?1") void…
Galet
  • 5,853
  • 21
  • 82
  • 148
78
votes
7 answers

Api annotation's description is deprecated

In Swagger, the @Api annotation's description element is deprecated. Deprecated. Not used in 1.5.X, kept for legacy support. Is there a newer way of providing the description?
Soumitri Pattnaik
  • 3,246
  • 4
  • 24
  • 42
66
votes
8 answers

Springfox 3.0.0 is not working with Spring Boot 2.6.0

Springfox 3.0.0 is not working with Spring Boot 2.6.0, after upgrading I am getting the following error org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is…
Thirumal
  • 8,280
  • 11
  • 53
  • 103
65
votes
9 answers

Remove Basic Error Controller In SpringFox SwaggerUI

Is there a way i can remove the "basic-error-controller" from springfox swagger-ui? Picture:
Rajkishan Swami
  • 3,569
  • 10
  • 48
  • 68
54
votes
23 answers

Added Springfox Swagger-UI and it's not working, what am I missing?

Following the instructions here: http://www.baeldung.com/swagger-2-documentation-for-spring-rest-api I added these dependencies to my project: compile "io.springfox:springfox-swagger2:2.7.0" compile "io.springfox:springfox-swagger-ui:2.7.0" and…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
50
votes
25 answers

Springfox swagger-ui.html unable to infer base URL - Caused by missing cookies

We have our Spring Boot services behind an API Gateway. With an earlier version of Springfox - 2.1.2 we had no issues in loading the swagger-ui.html page. This worked with Spring Boot 1.4.3.RELEASE. From then, we have upgraded to Boot 1.5.7 and…
Arnab Gupta
  • 677
  • 1
  • 5
  • 9
50
votes
10 answers

swagger @ApiModelProperty example value for List property

I have one class in which there is one property which is List public class MyClass { .... @ApiModelProperty(position = 2) private List productIdentifiers; .... } This code generates the example values as…
Anil Bharadia
  • 2,760
  • 6
  • 34
  • 46
38
votes
1 answer

Why is v2/api-docs the default URL when using springfox and Swagger2?

I'm just starting using swagger following this guide, but I found out something very weird that makes no sense for me. As far as I remember , the v2/api-docs should be used for when you have docs of the version number 2 of your API. So, the default…
jpganz18
  • 5,508
  • 17
  • 66
  • 115
36
votes
3 answers

Spring + Springfox + Header Parameters

@RequestMapping(...) public Foo getFoo(@HeaderParam("header") final String header) { ... } Adding a @HeaderParam method parameter as above springfox picks it up and when I look at the swagger-ui it has a field for the header. This is exactly…
Jay Anderson
  • 937
  • 1
  • 8
  • 18
35
votes
13 answers

How to run Swagger 3 on Spring Boot 3

Using a fresh Spring Initialzr with Java17 and Spring Boot 3.0.0, and an extra addition to the pom.xml for Springfox Swagger 3, I can't for the life of me get Swagger pages to work. Instead, I get the whitelabel error page with 404. Pom.xml
Ahmed Tawfik
  • 1,159
  • 1
  • 8
  • 13
35
votes
11 answers

Springfox swagger not working in spring boot 2.2.0

I want to upgrade spring boot v2.1.9 to 2.2.0. But after the upgrade I am getting some exceptions, which says spring fox is using an older version of spring-plugin-core. Is there any alternate solution for this or do I need to give up the springfox…
Joyson Rego
  • 968
  • 2
  • 11
  • 29
35
votes
4 answers

How to change basePath for Springfox Swagger 2.0

I'm running a service, where Swagger UI is accessible at: http://serviceURL/swagger-ui.html However, it is behind a proxy, such as: http://proxyURL/serviceName Generated URLs by Swagger UI are looking like: http://proxyURL/ instead of the actual…
Martin Asenov
  • 1,288
  • 2
  • 20
  • 38
33
votes
1 answer

Using @RequestParam annotated method with swagger ui

I am using Springfox libraries to generate documentation for REST service and display it in Swagger UI. I followed the directions in Springfox documentation. I have one controller, which uses parameters from query string and the method is mapped as…
jny
  • 8,007
  • 3
  • 37
  • 56
1
2 3
52 53