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
9
votes
2 answers

Swagger Api Documentation in Spring API Gateway

I have the above architecture in the project. Product, Order, Payment Microservice is a Rest API which currently has swagger integration, but now the flow is changed I can't expose the Microservice Rest API now all the REST API calls is been made…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
9
votes
3 answers

Springfox swagger inheritance support

Is there any way to expose inheritance/ polymorphism in springfox swagger (2.7.0)? I know that swagger specification supports allOf. Is springfox support this? Below is sample domain model. @ApiModel public abstract class Animal{ private String…
krogulec.piotr
  • 164
  • 1
  • 8
9
votes
1 answer

Customize endpoints of dockets with springfox Swagger

I've searched on the internet how to customize endpoints of my multiple dockets, but haven't found the answer. My module has several APIs. I want to generate Swagger documentation on different endpoints, each one positioned on the root of its…
salidou
  • 173
  • 1
  • 6
9
votes
2 answers

Swagger for SpringMVC - Alternatives to Springfox?

Can any of you suggest any alternatives for implementing Swagger for Spring MVC based REST API? FYI, this is not Spring boot. I've tried Springfox, but IMHO it is a buggy mess.
Mr Smith
  • 3,318
  • 9
  • 47
  • 85
9
votes
1 answer

Configure security schemas and contexts in Springfox and Spring MVC

I have simple REST services implemented with Spring MVC. I decided to describe them with Springfox and Swagger 2.0. Everything seemed to be OK until I started adding security schemas and contexts. I use HTTP Basic authentication for certain…
pgiecek
  • 7,970
  • 4
  • 39
  • 47
9
votes
3 answers

How can I modify swagger-ui.html for springfox?

I am using springfox's swagger implementation. I would like to modify the swagger-ui.html to take a custom header value. How do I modify this file? Or tell spring fox to use an alternate file?
mad_fox
  • 3,030
  • 5
  • 31
  • 43
8
votes
3 answers

why Swagger UI is not working in Spring Boot 3.0 version?

I'm trying to run my Spring boot application which is based on version 3.0 with swagger UI and I'm getting a lot of exceptions I have explored many sources like youtube and documentation but I'm unable to find the solution.
Rohan Mourya
  • 83
  • 1
  • 1
  • 5
8
votes
3 answers

Whitelabel Error Page Swagger, This application has no explicit mapping for /error, so you are seeing this as a fallback swagger2:3.0.0-SNAPSHOT

Trying to configure swagger in spring boot 2.3.1. Gradle Config repositories { mavenCentral() maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' } } dependencies { implementation…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
8
votes
0 answers

Swagger How to enable Filter by tag as case insensitive

I am using Swagger-UI implemented through Springfox 2.9.2. I have enabled "Filter By tag" by setting "filter" as true in…
Unni
  • 161
  • 1
  • 5
8
votes
1 answer

Java - how to generate Swagger UI directly from openapi 3.0 specification

I have openapi 3.0 specification in yaml format and my application that generates code from it. Everything works fine except generation of swagger ui. I use spring-fox for its generation, but it seems like it generates swagger ui 2.0 version from…
Sergei Podlipaev
  • 1,331
  • 1
  • 14
  • 34
8
votes
1 answer

How to customize example values in Springfox's Swagger 2 for a JSONObject request body?

I would like to customize the example values for my API documentation I am making with Springfox's Swagger (Spring REST API). Since the request body is a stringified JSON via JQuery AJAX, the @RequestParam is a String. I've tried multiple…
IchBinGrumpig
  • 119
  • 1
  • 1
  • 10
8
votes
2 answers

SpringFox - Hide certain fields in Swagger-ui that aren't required for the call to an endpoint

I would like to know if there is any way of making SpringFox to not show all the fields of a certain entity that aren't required in the call to an specific endpoint. For example: Having the following entity: public class Car { long id; …
RabidTunes
  • 775
  • 1
  • 8
  • 21
8
votes
2 answers

Spring Boot2 Oauth2 Implicit Flow - http://localhost:8080/oauth/authorize getting Access Denied

I have created a Spring Boot 2 Application, integrated SpringFox Swagger 2.8.0 with Implicit Oauth2 Grant for Authentication and Authorization. The Code is working fine but when I click Authorize button it redirects to the…
Alex Man
  • 4,746
  • 17
  • 93
  • 178
8
votes
1 answer

swagger annotation content-type not set

I have this spring rest controller: @RestController @RequestMapping("/communications") class CommunicationController(private val service: CommunicationService) { @ApiOperation( produces = APPLICATION_JSON_VALUE, consumes =…
louis amoros
  • 2,418
  • 3
  • 19
  • 40
8
votes
0 answers

How to order API endpoints with Swagger annotations (Springfox)

I want my controller endpoints marked with @ApiOperation to come in a certain order in the Swagger spec. Tried to set position on @ApiOperation like this: @ApiOperation(value = "xxx", position = 1) seems to have no effect on the result. Any…
S. Pauk
  • 5,208
  • 4
  • 31
  • 41