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

Render html in springfox-swagger-ui

I recently updated an application running springfox-swagger2 and springfox-swagger-ui 2.5.0 to use version 2.6.0. The application's API documentation uses
  • , and
    tags, which were rendered correctly with 2.5.0, but with version 2.6.0 the…
  • mika
    • 2,495
    • 22
    • 30
    7
    votes
    2 answers

    No mapping found for swagger-resources/configuration/ui

    I am trying to configure swagger ui in non spring boot app. I have done following things. 1. Added Following dependencies io.springfox springfox-swagger2
    Ganesh
    • 5,977
    • 5
    • 19
    • 25
    7
    votes
    1 answer

    Custom ResponseModel in Springfox/Swagger for returning of ObjectNode

    I'd like to use Swagger to provide an API-Documentation for my Spring Boot API. I managed to get Springfox 2.3.0 to work and everything works as expected except for the controllers returning an ObjectNode. Swagger tries to convert the returned class…
    Bruce206
    • 71
    • 4
    7
    votes
    3 answers

    Springfox Swagger generating requests with port 80 for HTTPS URLS

    I am experiencing an issue using springfox-swagger2 v2.2.0 related to the request padding port 80 for a HTTP URL. Is there anyway to disable the generation of the port or set the port to 443 programmatically based on a Spring Profile? Generated…
    jz15
    • 335
    • 4
    • 10
    7
    votes
    2 answers

    SpringFox not finding jax-rs endpoints

    After solving Using Springfox to document jax-rs services in a Spring app, I now find that SpringFox's JSON reply doesn't show any APIs: { "swagger": "2.0", "info": { "description": "Some description", "version": "1.0", "title": "My…
    Don Branson
    • 13,631
    • 10
    • 59
    • 101
    6
    votes
    4 answers

    Got "Ambiguous handler methods mapped for '/v3/api-docs'" after migrating from SpringFox to SpringDoc

    Using Spring Boot 2.4.5 and IntelliJ 2021.2. After migrated io.springfox springfox-boot-starter 3.0.0 to
    夢のの夢
    • 5,054
    • 7
    • 33
    • 63
    6
    votes
    2 answers

    After Update of Springfox from 2.9.2 to 2.10.4 error "Unable to infer base url. ..."

    I just updated the Springfox dependency in my Spring Boot application (version 2.3.1.RELEASE) from 2.9.2 to 2.10.4. 2.3.1.RELEASE 2.10.4 Due to class changes in the…
    Thorsten Kitz
    • 165
    • 2
    • 7
    6
    votes
    0 answers

    How Do I Update the Swagger UI Documentation in JHipster?

    In my JHipster app, I have manually updated the OpenAPI spec file (api.yml), following official instructions for API-first development. However, the documentation (generated via Springfox) does not update, and still lists the endpoints described in…
    sliute
    • 101
    • 5
    6
    votes
    2 answers

    Trying to reach swagger-ui or api/api-docs but got a 404 error

    It's my first post so feel free to leave some feedback or if i do something wrong :) I am using spring-boot and resteasy : org.springframework.boot
    Pierrot
    • 61
    • 1
    • 1
    • 5
    6
    votes
    1 answer

    How to add "Example Value" to a parameter in Swagger

    I'm creating a new Rest API with Spring Boot using Swagger to document it and I can't change the Example Value showed on the web. I'm able to change it in the model, but not in the POST parameter. These are my dependencies:
    frm
    • 657
    • 4
    • 9
    • 22
    6
    votes
    5 answers

    Swagger not detecting Api built with Spring Data Rest

    I'm working on a spring boot application using swagger to generate docs for my API ,I'm using Spring data rest to generate the Api but when I run the app I get the swagger message : No operations defined in spec! This my Api code : @Api(tags =…
    e2rabi
    • 4,728
    • 9
    • 42
    • 69
    6
    votes
    1 answer

    Why does @ApiModelProperty "name" attribute has no effect?

    In my spring boot app, I have a DTO object with a nested list of DTO objects. class: @Getter @Setter @Builder @NoArgsConstructor @AllArgsConstructor @ApiModel(value = "contact") public class ContactDTO { @ApiModelProperty(value = "id", example =…
    m1well
    • 716
    • 4
    • 15
    • 28
    6
    votes
    0 answers

    How to make swagger 3 show multiple responses on swagger UI using annotations?

    Is it possible to use the latest swagger 3 release to show in response model not only one response class. I want to show all possible variants (e.g. 3 possible child classes can be in response - not only base class or one of child). I think, there…
    Yurii Kozachok
    • 615
    • 1
    • 7
    • 21
    6
    votes
    1 answer

    SpringFox, Spring Data Rest with JpaRepository - Swagger doesn't recognize Rest repositories with spring boot

    I'm having a trouble with Springfox swagger 2 for my API documentation. It couldn't recognize my rest repositories (JpaRepository/PagingAndSortingRepository). import org.springframework.data.jpa.repository.JpaRepository; import…
    6
    votes
    3 answers

    Add Swagger Basic AUTH to Spring Boot App

    Requirements: Spring Boot application with Springfox Add BASIC authentication to Swagger Pass on all other requests Code: implemented @EnableWebSecurity @Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter { …
    Cortlendt
    • 2,190
    • 4
    • 29
    • 50