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
6
votes
1 answer

How do do slice testing in Spring Boot 1.4 using @DataJpaTest with SpringFox @EnableSwagger2

Re: https://spring.io/blog/2016/04/15/testing-improvements-in-spring-boot-1-4 I tried the @DataJpaTest to test my repository but my application is using Springfox, so with Springfox @EnableSwagger2 the test execution will fail with the following…
pumpump
  • 361
  • 2
  • 15
6
votes
1 answer

Get access to springfox swagger-ui behind spring-security

I am going to use springfox (2.6.1v) with swagger-ui in my Spring Boot (1.4.2v). The configuration for it looks: @Configuration @EnableSwagger2 public class SwaggerConfig { @Bean public Docket api() { return new…
Ziemowit Stolarczyk
  • 1,014
  • 2
  • 11
  • 26
6
votes
5 answers

How to exclude OPTIONS, HEAD and PATCH method from spring-data-rest entityController

I am using spring-data-rest-webmvc:jar:2.5.3.RELEASE to write REST API and rendered the resources in springfox-data-rest-2.6.0. The swagger renders all methods resides in RestEntityController. I excluded some methods in repository level by using…
Achaius
  • 5,904
  • 21
  • 65
  • 122
6
votes
1 answer

How to configure Gradle to find local SNAPSHOT resource?

I'm trying to do some work with the springfox project which has been broken up into two separate projects: the springfox runtime, and a suite of demos. In order to investigate the behavior of certain configurations, I need to change the module in…
PaulProgrammer
  • 16,175
  • 4
  • 39
  • 56
5
votes
2 answers

Springfox-oas not generating array type query parameter

I have a very simple REST API (Spring-Boot) which should accept a list of strings as query parameters: @ApiOperation(value = "Get the value drivers for a part by its as JSON output") @GetMapping(AppConstants.VDJSON) ValueDriver getValueDriverJson( …
Axel Amthor
  • 10,980
  • 1
  • 25
  • 44
5
votes
3 answers

Spring Boot Swagger duplicate model type when using inheritance

I've a Java project that uses Spring Boot and Swagger. The project consists of a simple API controller that implements a single endpoint. Invoking the GET method on the endpoint gets all users. Invoking the PUT method on the same endpoint updates a…
dhrm
  • 14,335
  • 34
  • 117
  • 183
5
votes
2 answers

Could not resolve pointer: /definitions/Error-ModelName

I am new to Swagger.io and so also to Spring fox. The problem I am having is, that for some Reason one Object is not correctly referenced to its model. The error in the UI: The error is because it ends up like this in the JSON: "schema": { "$ref":…
Maxdola
  • 1,562
  • 2
  • 10
  • 29
5
votes
3 answers

Swagger UI not showing example value and model

I was generating Swagger API specification from Spring Boot REST controllers using Springfox. I noticed an issue where the example value/model could not be shown for response. As an investigation, I checked the JSON API doc at…
Patrick C.
  • 1,339
  • 3
  • 16
  • 31
5
votes
0 answers

Springfox swagger2 without Spring Boot (Spring-web 4.3.22)

I am trying to use Springfox Swagger 2 with a non-SpringBoot Spring application (Spring-web MVC), using Spring-web 4.3.22-RELEASE. However when I include the following dependency io.springfox
pasquers
  • 772
  • 1
  • 8
  • 24
5
votes
2 answers

Is there a way to get swagger ui html from io.swagger.models.Swagger?

OK, I have a number of io.swagger.models.Swagger objects, I have merged these into one new, super Swagger. Now I want the super html. How can I get this? Note, in order to get each of my Swagger definitions, I used new…
HellishHeat
  • 2,280
  • 4
  • 31
  • 37
5
votes
1 answer

How to arrange the order of Docket's groupName displayed in Swagger UI

I'm setting two different Docket API in one spring boot application. I gave one Docket "Test" groupName and leave the other, so it ended up as "default" in the Swagger UI. My question is, how to arrange the order of these Dockets in the UI. At…
chronos14
  • 321
  • 1
  • 5
  • 20
5
votes
0 answers

Swagger Java ApiResponse Map

I am trying to get the response example value in the Swagger UI docs to correctly display a map. This is what my map looks like: Map>. The UserRole object just has two fields, roleId & roleName. According to the Javadoc for…
Gremash
  • 8,158
  • 6
  • 30
  • 44
5
votes
1 answer

Is there a way to render only specific api endpoint in swagger-ui 3.*?

I have a spring 4 project with springfox-swagger2 2.8.o generating the swagger 2 spec. To consume this spec I am using swagger-ui 3.22.1 in Front-end app. Currently swagger-ui is showing all the endpoints in the spec, how can i only show a specific…
m_green
  • 71
  • 1
  • 3
5
votes
2 answers

Springfox Swagger: Could not resolve pointer: /definitions/Instant

We have a SpringBoot project, and we're using Springfox Swagger for generating the API documentation. There's a response class that contains: private Collection quartzScheduledDates; When I run SwaggerUI, I receive this message: Errors…
Vlad Dinulescu
  • 1,173
  • 1
  • 14
  • 24
5
votes
0 answers

Springfox - Manually, programmatically adding model

I would like to add a custom controller to swagger API descriptor. It's quite easy with spring fox to a custom existing model. But I don't succeed to add custom API to swagger descriptor from scratch. An example is better than a long speech. I did a…
Toff
  • 51
  • 3