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

Custom commentary for urls in Springfox Swagger UI (api-doc)

I have a spring boot aplication with springfox-swagger2 and springfox-swagger-ui (version 2.9.2) genereting nice interactive api documentation based on my @Controller components and their @RequestMapping annotated methods. I would llike to enhance…
Lubomír Grund
  • 145
  • 1
  • 13
0
votes
0 answers

Request header parameters are not checked

I have a spring boot application which call web services using REST : this is an example on my call with bean configurations : @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = ResultSearch.class), …
Mirlo
  • 625
  • 9
  • 26
0
votes
1 answer

java how to share field and method between classes

I have some BaseX pojo class ex: public class Base1 { private String base1Field1; private String base1Field2; // getter & setter } public class Base2 { private String base2Field1; private String base2Field2; // getter &…
min
  • 953
  • 1
  • 11
  • 23
0
votes
1 answer

How to define different response models for different status codes in openApi / springfox-swagger2

Given the following REST method with springfox-swagger2 annotations: @GetMapping(value = "/access", produces = MediaType.APPLICATION_JSON_VALUE) @ApiOperation(value = "check access allowed") @ApiResponses({ @ApiResponse(code = 200, message =…
Robert
  • 1,710
  • 2
  • 18
  • 35
0
votes
1 answer

Alias host name in springfox api-doc

Is there any possibility to set an alias instead of real host name in swagger api-doc? For example, I`d like to see in the doc something like this: "host": "someAlias" Instead of usual localhost: "host": "localhost:" But this alias should…
user3856196
  • 349
  • 4
  • 16
0
votes
1 answer

Swagger UI 2.9.2 not showing services under controller agrupations

I'm using springfox swagger to document the REST web services under a Spring Boot project, but swagger-ui is not working... I get to the index page and see all the controller agrupations, but when I select any of them, no services are shown. I have…
Pep Gomez
  • 197
  • 4
  • 14
0
votes
1 answer

SpringFox Swagger not working as expected on IBM Liberty 19.0.0.1

Attached below (Swagger on Tomcat) (click to zoom-in) - My application's Swagger UI on Tomcat 9 Attached (Swagger on Liberty) (click to zoom-in) - My application's Swagger UI on Liberty 19.0.0.1 In Tomcat, as can be seen, the 200 response body is…
0
votes
2 answers

Swagger integration into a NON SpringBoot project using SpringFox

I have the same question as here. I want to integrate swagger into a non spring boot project. I followed the steps given in the answer here which uses springfox but I am getting the following error on server startup:…
Sarosh Aga
  • 3
  • 1
  • 6
0
votes
1 answer

SpringFox Swagger UI has wrong base url

I got confused with spring fox swagger ui base url, they are not pointing to correct url. I just deployed a war in a context, so the app is in 127.0.0.1:8080/bff, i managed to add swagger and success, now its running in…
aswzen
  • 1,512
  • 29
  • 46
0
votes
1 answer

Swagger UI not rendering the correct response(Should return a JSON response)[This is for the GET request Code 200]

Swagger UI is not returning the expected JSON response in the example value. It is returning a empty list.Below are the code snippets I am using, Gradle…
0
votes
1 answer

Unable to generate Swagger UI for Spring Boot + Spring Integration using Spring REST Docs & springfox 3.0.0-SNAPSHOT

I am trying to setup Swagger for a Spring Boot + Spring Integration Project (involving an inbound-gateway) using Spring REST Docs style and springfox 3.0.0-SNAPSHOT. On following the instructions from…
bmylavar
  • 61
  • 1
  • 12
0
votes
1 answer

How to bypass Authorization in Swagger UI using springfox

I need to bypass spring security when the request is coming from Swagger-UI, test environment. This is so we can test quickly without having to generate a new token every time since the data is test anyway. My application is running on Spring Boot.…
RAFJR
  • 362
  • 1
  • 7
  • 22
0
votes
1 answer

Spring Boot - Swagger generate json/yaml file and client code?

Have used springfox dependencies in my spring boot application to show up swagger ui. Used annotation like @SwaggerDefinition and @EnableSwagger2. But they are not generating any html's or json/yaml or any client code. So i used plugin found at :…
Molay
  • 1,154
  • 2
  • 19
  • 42
0
votes
1 answer

How add header for swagger generation based on annotation?

Consider example: @RequestMapping("myPath") public Mono myMethod(@RequestParam(value = "amount") Long amount, @AuthenticationPrincipal MyUser user) { } To skip MyUser from parameter list I have added @AuthenticationPrincipal to exclusions…
Cherry
  • 31,309
  • 66
  • 224
  • 364
0
votes
1 answer

Swagger - Custom authentication for /api-docs

We have have a Spring 5, non-Spring Boot application, using Springfox 2.9.2 + Swagger UI. I don't know how to secure /api-docs endpoint: I'd like it to call my authentication function each time it's accessed. I made it work for swagger-ui.html, but…
Martin Čejka
  • 441
  • 1
  • 5
  • 10