Library for OpenAPI 3 with spring-boot

Overview

Build Status Quality Gate Known Vulnerabilities

Octocat

Full documentation

Acknowledgements

springdoc-openapi is made possible thanks to all of its contributors.

Introduction

The springdoc-openapi Java library helps automating the generation of API documentation using Spring Boot projects. springdoc-openapi works by examining an application at runtime to infer API semantics based on Spring configurations, class structure and various annotations.

The library automatically generates documentation in JSON/YAML and HTML formatted pages. The generated documentation can be complemented using swagger-api annotations.

This library supports:

  • OpenAPI 3
  • Spring-boot (v1 and v2)
  • JSR-303, specifically for @NotNull, @Min, @Max, and @Size.
  • Swagger-ui
  • Oauth 2

The following video introduces the Library:

This is a community-based project, not maintained by the Spring Framework Contributors (Pivotal)

Getting Started

Library for springdoc-openapi integration with spring-boot and swagger-ui

  • Automatically deploys swagger-ui to a Spring Boot 2.x application
  • Documentation will be available in HTML format, using the official swagger-ui jars.
  • The Swagger UI page should then be available at http://server:port/context-path/swagger-ui.html and the OpenAPI description will be available at the following url for json format: http://server:port/context-path/v3/api-docs
    • server: The server name or IP
    • port: The server port
    • context-path: The context path of the application
  • Documentation can be available in yaml format as well, on the following path: /v3/api-docs.yaml
  • Add the springdoc-openapi-ui library to the list of your project dependencies (No additional configuration is needed):
   <dependency>
      <groupId>org.springdoc</groupId>
      <artifactId>springdoc-openapi-ui</artifactId>
      <version>last-release-version</version>
   </dependency>
  • This step is optional: For custom path of the swagger documentation in HTML format, add a custom springdoc property, in your spring-boot configuration file:
# swagger-ui custom path
springdoc.swagger-ui.path=/swagger-ui.html

Source code of the Demo Applications

Spring-boot with OpenAPI Demo applications.

Demo Spring Boot 2 Web MVC with OpenAPI 3.

Demo Spring Boot 2 WebFlux with OpenAPI 3.

Demo Spring Boot 1 Web MVC with OpenAPI 3.

Demo Spring Boot 2 WebFlux with Functional endpoints OpenAPI 3.

Demo Spring Boot 2 and Spring Hateoas with OpenAPI 3.

Branching

Integration of the library in a Spring Boot 2.x.x project without the swagger-ui:

  • Documentation will be available at the following url for json format: http://server:port/context-path/v3/api-docs
    • server: The server name or IP
    • port: The server port
    • context-path: The context path of the application
  • Documentation will be available in yaml format as well, on the following path : /v3/api-docs.yaml
  • Add the library to the list of your project dependencies. (No additional configuration is needed)
   <dependency>
      <groupId>org.springdoc</groupId>
      <artifactId>springdoc-openapi-webmvc-core</artifactId>
      <version>last-release-version</version>
   </dependency>
  • This step is optional: For custom path of the OpenAPI documentation in Json format, add a custom springdoc property, in your spring-boot configuration file:
# /api-docs endpoint custom path
springdoc.api-docs.path=/api-docs
  • This step is optional: If you want to disable springdoc-openapi endpoints, add a custom springdoc property, in your spring-boot configuration file:
# disable api-docs
springdoc.api-docs.enabled=false

Error Handling for REST using @ControllerAdvice

To generate documentation automatically, make sure all the methods declare the HTTP Code responses using the annotation: @ResponseStatus

Adding API Information and Security documentation

The library uses spring-boot application auto-configured packages to scan for the following annotations in spring beans: OpenAPIDefinition and Info. These annotations declare, API Information: Title, version, licence, security, servers, tags, security and externalDocs. For better performance of documentation generation, declare @OpenAPIDefinition and @SecurityScheme annotations within a Spring managed bean.

spring-webflux support with Annotated Controllers

  • Documentation can be available in yaml format as well, on the following path : /v3/api-docs.yaml
  • Add the library to the list of your project dependencies ( No additional configuration is needed)
   <dependency>
      <groupId>org.springdoc</groupId>
      <artifactId>springdoc-openapi-webflux-ui</artifactId>
      <version>last-release-version</version>
   </dependency>
  • This step is optional: For custom path of the swagger documentation in HTML format, add a custom springdoc property, in your spring-boot configuration file:
# swagger-ui custom path
springdoc.swagger-ui.path=/swagger-ui.html

The springdoc-openapi libraries are hosted on maven central repository. The artifacts can be viewed accessed at the following locations:

Releases:

Snapshots:

Thank you for the support

  • Thanks a lot JetBrains for supporting springdoc-openapi project.

JenBrains logo

Comments
  • 404 not found on swagger UI

    404 not found on swagger UI

    Running Spring Boot 2.2.2 with org.springdoc:springdoc-openapi-ui:1.2.26

    http://localhost:8069/v3/api-docs/swagger-config -> 200 OK http://localhost:8069/v3/api-docs -> 200 OK http://localhost:8069/swagger-ui.html -> 302 -> http://localhost:8069/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config -> 404 Not found.

    All i did was adding springdoc-openapi-ui to an existing spring boot 2.2.2 application. No configuration done at all.

    Ive been reading the docs, but cannot see if im doing something wrong or if this is a bug.

    question 
    opened by ghost 35
  • Add support for Jakarta EE

    Add support for Jakarta EE

    Is your feature request related to a problem? Please describe. When using springdoc-openapi-ui, one gets a dependency to the old javax-apis through the version of swagger-core that is included (via springdoc-common).

    Describe the solution you'd like It seems swagger has solved this by publishing separate artifacts suffixed with jakarta (See https://github.com/swagger-api/swagger-core/pull/3881). It would be nice if one could do the same with springdoc, or if possible solve it in some other way, so as not have to manually exclude the javax-swagger-versions and include the jakarta-swagger versions a la

    implementation(
      'io.swagger.core.v3:swagger-annotations-jakarta:2.1.11',
      'io.swagger.core.v3:swagger-integration-jakarta:2.1.11',
      'io.swagger.core.v3:swagger-models-jakarta:2.1.11'
    )
    
    implementation('org.springdoc:springdoc-openapi-ui:1.5.11') {
      exclude(group: 'io.swagger.core.v3', module: 'swagger-annotations')
      exclude(group: 'io.swagger.core.v3', module: 'swagger-integration')
      exclude(group: 'io.swagger.core.v3', module: 'swagger-models')
    }
    

    I'm not well enough versed in all the possibilities of configuring dependencies in maven to come up with the best solution to this, but it would be nice if it could be solved somehow, as jakarta.* is where the development will continue.

    enhancement 
    opened by abrudin 27
  • Malformed api-docs JSON when custom HttpMessageConverter is used

    Malformed api-docs JSON when custom HttpMessageConverter is used

    When custom HttpMessageConverter is used malformed api-docs endpoint produces malformed JSON

    Steps to reproduce the behavior:

    • spring-boot version 2.2.6.RELEASE
    • springdoc-openapi 1.3.5-SNAPSHOT
    • the actual result is a JSON String created from the String produced by org.springdoc.webmvc.api.OpenApiResource#openapiJson. The original response is wrapped with a leading and trailing double quote and all the double internal double quotes are escaped: "{\"openapi\":\"3.0.1\",\"info\":{\"title\":\"OpenAPI definition\",\"version\":\"v0\"},\"servers\":[{\"url\":\"http://localhost:8080\",\"description\":\"Generated server url\"}],\"paths\":{\"/get\":{\"get\":{\"tags\":[\"controller\"],\"operationId\":\"getSomeMap\",\"responses\":{\"200\":{\"description\":\"default response\",\"content\":{\"*/*\":{\"schema\":{\"$ref\":\"#/components/schemas/ImmutableMultimapStringString\"}}}}}}}},\"components\":{\"schemas\":{\"ImmutableMultimapStringString\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"}}}}}}"
    • a sample application can be found in https://github.com/Geneea/springdoc-test

    Expected behavior

    • I would expect that org.springdoc.webmvc.api.OpenApiResource#openapiJson should not do the conversion from OpenAPI to String. Just return OpenAPI or ResponseEntity<OpenAPI> and leave the serialization for the registered HttpMessageConverter.

    Additional context An ugly fix for this problem is https://github.com/Geneea/springdoc-test/blob/master/src/main/java/com/geneea/springdoc/FixApiDocsWithFilter.java registering a Filter what corrects the malformed response.

    Same problem is described in https://stackoverflow.com/questions/59393191/endpoint-api-docs-doesnt-work-with-custom-gsonhttpmessageconverter

    enhancement 
    opened by peter-szepe-geneea 21
  • Multiple OpenAPI definitions in one Spring Boot project

    Multiple OpenAPI definitions in one Spring Boot project

    I am trying to describe two different versions (v1 and v2) with Open API. Basically Swagger UI I should display v1 from http://localhost:8080/v3/api-docs and v2 from http://localhost:8080/v3/api-docs/v2.

    With the springfox Swagger Config I could do this through Dockets. Then I had the selection where I could switch the different endpoint definitions.

    enhancement 
    opened by hemju 17
  • Enhance swagger-ui access

    Enhance swagger-ui access

    Describe the bug

    • Swagger UI cannot load the API description after start. It only works after explicitly requesting ${apiDocs.path}/swagger-config

    To Reproduce Steps to reproduce the behavior:

    1. Configure springdoc as follows
      apiDocs:
        path: /api-docs/v3
        groups:
          enabled: true
      group-configs:
        - group: basic
          paths-to-match: /v2/**,
        ...
    
    1. Start the Spring Boot application

    2. Open swagger-ui/index.html?configUrl=/api-docs/v3/swagger-config

    Swagger UI cannot find the API definition. The source of index.html contains:

    ...
    <script>
        window.onload = function() {
          // Begin Swagger UI call region
          const ui = SwaggerUIBundle({
            url: "",
            dom_id: '#swagger-ui',
            deepLinking: true,
            presets: [
              SwaggerUIBundle.presets.apis,
              SwaggerUIStandalonePreset
            ],
            plugins: [
              SwaggerUIBundle.plugins.DownloadUrl
            ],
            layout: "StandaloneLayout"
          });
          // End Swagger UI call region
    
          window.ui = ui;
        };
      </script>
    
    1. Open /api-docs/v3/swagger-config

    2. Open swagger-ui/index.html?configUrl=/api-docs/v3/swagger-config again

    Swagger UI can now find the API definition. The source of index.html contains:

        <script>
        window.onload = function() {
          // Begin Swagger UI call region
          const ui = SwaggerUIBundle({
            url: "",
            dom_id: '#swagger-ui',
            deepLinking: true,
            presets: [
              SwaggerUIBundle.presets.apis,
              SwaggerUIStandalonePreset
            ],
            plugins: [
              SwaggerUIBundle.plugins.DownloadUrl
            ],
            layout: "StandaloneLayout" ,
    
      "oauth2RedirectUrl" : "http://localhost:8080/swagger-ui/oauth2-redirect.html",
      "urls" : [ {
        "url" : "<redacted>",
        "name" : "<redacted>"
      } ]
    
          });
          // End Swagger UI call region
    
          window.ui = ui;
        };
      </script>
    
    • What version of spring-boot you are using? --> 2.6.1
    • What modules and versions of springdoc-openapi are you using? --> 1.6.0
    • What is the actual and the expected result using OpenAPI Description (yml or json)? --> Swagger UI should always work
    • Provide with a sample code (HelloController) or Test that reproduces the problem --> not related to a particular controller

    Expected behavior

    Swagger UI should always work

    enhancement 
    opened by waschmittel 16
  • Exception when updating springdoc

    Exception when updating springdoc

    Describe the bug I'm using springdoc 1.3.4 without any errors, however after updating to a newer version the swagger customizer crashes with a stacktrace, and so swaggerConf is created.

    Stacktrace:

    [ERROR] 11-05-2020 11:22:20.734 [http-nio-8080-exec-10] [dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Duplicate key class Parameter {
        name: X-API-VERSION
        in: header
        description: null
        required: null
        deprecated: null
        allowEmptyValue: null
        style: null
        explode: null
        allowReserved: null
        schema: class StringSchema {
            class Schema {
                type: string
                format: null
                $ref: null
                description: null
                title: null
                multipleOf: null
                maximum: null
                exclusiveMaximum: null
                minimum: null
                exclusiveMinimum: null
                maxLength: null
                minLength: null
                pattern: null
                maxItems: null
                minItems: null
                uniqueItems: null
                maxProperties: null
                minProperties: null
                required: null
                not: null
                properties: null
                additionalProperties: null
                nullable: null
                readOnly: null
                writeOnly: null
                example: null
                externalDocs: null
                deprecated: null
                discriminator: null
                xml: null
            }
        }
        examples: null
        example: null
        content: null
        $ref: null
    }] with root cause
    java.lang.IllegalStateException: Duplicate key class Parameter {
        name: X-API-VERSION
        in: header
        description: null
        required: null
        deprecated: null
        allowEmptyValue: null
        style: null
        explode: null
        allowReserved: null
        schema: class StringSchema {
            class Schema {
                type: string
                format: null
                $ref: null
                description: null
                title: null
                multipleOf: null
                maximum: null
                exclusiveMaximum: null
                minimum: null
                exclusiveMinimum: null
                maxLength: null
                minLength: null
                pattern: null
                maxItems: null
                minItems: null
                uniqueItems: null
                maxProperties: null
                minProperties: null
                required: null
                not: null
                properties: null
                additionalProperties: null
                nullable: null
                readOnly: null
                writeOnly: null
                example: null
                externalDocs: null
                deprecated: null
                discriminator: null
                xml: null
            }
        }
        examples: null
        example: null
        content: null
        $ref: null
    }
    	at org.springdoc.core.AbstractRequestBuilder.lambda$getParameterLinkedHashMap$4(AbstractRequestBuilder.java:220) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at java.util.HashMap.merge(HashMap.java:1300) ~[?:?]
    	at java.util.stream.Collectors.lambda$toMap$68(Collectors.java:1658) ~[?:?]
    	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) ~[?:?]
    	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1621) ~[?:?]
    	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
    	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
    	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
    	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
    	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) ~[?:?]
    	at org.springdoc.core.AbstractRequestBuilder.getParameterLinkedHashMap(AbstractRequestBuilder.java:216) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at org.springdoc.core.AbstractRequestBuilder.build(AbstractRequestBuilder.java:209) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at org.springdoc.api.AbstractOpenApiResource.calculatePath(AbstractOpenApiResource.java:238) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at org.springdoc.api.AbstractOpenApiResource.calculatePath(AbstractOpenApiResource.java:334) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at org.springdoc.webmvc.api.OpenApiResource.calculatePath(OpenApiResource.java:167) ~[springdoc-openapi-webmvc-core-1.3.9.jar:1.3.9]
    	at org.springdoc.webmvc.api.OpenApiResource.getPaths(OpenApiResource.java:133) ~[springdoc-openapi-webmvc-core-1.3.9.jar:1.3.9]
    	at org.springdoc.api.AbstractOpenApiResource.getOpenApi(AbstractOpenApiResource.java:154) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at org.springdoc.webmvc.api.OpenApiResource.openapiJson(OpenApiResource.java:117) ~[springdoc-openapi-webmvc-core-1.3.9.jar:1.3.9]
    	at org.springdoc.webmvc.api.MultipleOpenApiResource.openapiJson(MultipleOpenApiResource.java:135) ~[springdoc-openapi-webmvc-core-1.3.9.jar:1.3.9]
    	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
    	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
    	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.boot.devtools.remote.server.DispatcherFilter.doFilter(DispatcherFilter.java:72) ~[spring-boot-devtools-2.2.6.RELEASE.jar:2.2.6.RELEASE]
    	at org.springframework.boot.devtools.remote.server.DispatcherFilter.doFilter(DispatcherFilter.java:60) ~[spring-boot-devtools-2.2.6.RELEASE.jar:2.2.6.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:158) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at com.appfarms.app.common.security.ratelimiter.RateLimitFilter.doFilterInternal(RateLimitFilter.kt:41) ~[main/:?]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at com.appfarms.app.common.security.jwt.JwtAuthenticationFilter.doFilterInternal(JwtAuthenticationFilter.kt:61) ~[main/:?]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:92) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:77) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:109) ~[spring-boot-actuator-2.2.6.RELEASE.jar:2.2.6.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at java.lang.Thread.run(Thread.java:830) [?:?]
    [ERROR] 11-05-2020 11:22:21.157 [http-nio-8080-exec-4] [dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Duplicate key class Parameter {
        name: X-API-VERSION
        in: header
        description: null
        required: null
        deprecated: null
        allowEmptyValue: null
        style: null
        explode: null
        allowReserved: null
        schema: class StringSchema {
            class Schema {
                type: string
                format: null
                $ref: null
                description: null
                title: null
                multipleOf: null
                maximum: null
                exclusiveMaximum: null
                minimum: null
                exclusiveMinimum: null
                maxLength: null
                minLength: null
                pattern: null
                maxItems: null
                minItems: null
                uniqueItems: null
                maxProperties: null
                minProperties: null
                required: null
                not: null
                properties: null
                additionalProperties: null
                nullable: null
                readOnly: null
                writeOnly: null
                example: null
                externalDocs: null
                deprecated: null
                discriminator: null
                xml: null
            }
        }
        examples: null
        example: null
        content: null
        $ref: null
    }] with root cause
    java.lang.IllegalStateException: Duplicate key class Parameter {
        name: X-API-VERSION
        in: header
        description: null
        required: null
        deprecated: null
        allowEmptyValue: null
        style: null
        explode: null
        allowReserved: null
        schema: class StringSchema {
            class Schema {
                type: string
                format: null
                $ref: null
                description: null
                title: null
                multipleOf: null
                maximum: null
                exclusiveMaximum: null
                minimum: null
                exclusiveMinimum: null
                maxLength: null
                minLength: null
                pattern: null
                maxItems: null
                minItems: null
                uniqueItems: null
                maxProperties: null
                minProperties: null
                required: null
                not: null
                properties: null
                additionalProperties: null
                nullable: null
                readOnly: null
                writeOnly: null
                example: null
                externalDocs: null
                deprecated: null
                discriminator: null
                xml: null
            }
        }
        examples: null
        example: null
        content: null
        $ref: null
    }
    	at org.springdoc.core.AbstractRequestBuilder.lambda$getParameterLinkedHashMap$4(AbstractRequestBuilder.java:220) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at java.util.HashMap.merge(HashMap.java:1300) ~[?:?]
    	at java.util.stream.Collectors.lambda$toMap$68(Collectors.java:1658) ~[?:?]
    	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) ~[?:?]
    	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1621) ~[?:?]
    	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
    	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
    	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
    	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
    	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) ~[?:?]
    	at org.springdoc.core.AbstractRequestBuilder.getParameterLinkedHashMap(AbstractRequestBuilder.java:216) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at org.springdoc.core.AbstractRequestBuilder.build(AbstractRequestBuilder.java:209) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at org.springdoc.api.AbstractOpenApiResource.calculatePath(AbstractOpenApiResource.java:238) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at org.springdoc.api.AbstractOpenApiResource.calculatePath(AbstractOpenApiResource.java:334) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at org.springdoc.webmvc.api.OpenApiResource.calculatePath(OpenApiResource.java:167) ~[springdoc-openapi-webmvc-core-1.3.9.jar:1.3.9]
    	at org.springdoc.webmvc.api.OpenApiResource.getPaths(OpenApiResource.java:133) ~[springdoc-openapi-webmvc-core-1.3.9.jar:1.3.9]
    	at org.springdoc.api.AbstractOpenApiResource.getOpenApi(AbstractOpenApiResource.java:154) ~[springdoc-openapi-common-1.3.9.jar:1.3.9]
    	at org.springdoc.webmvc.api.OpenApiResource.openapiJson(OpenApiResource.java:117) ~[springdoc-openapi-webmvc-core-1.3.9.jar:1.3.9]
    	at org.springdoc.webmvc.api.MultipleOpenApiResource.openapiJson(MultipleOpenApiResource.java:135) ~[springdoc-openapi-webmvc-core-1.3.9.jar:1.3.9]
    	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
    	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
    	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.boot.devtools.remote.server.DispatcherFilter.doFilter(DispatcherFilter.java:72) ~[spring-boot-devtools-2.2.6.RELEASE.jar:2.2.6.RELEASE]
    	at org.springframework.boot.devtools.remote.server.DispatcherFilter.doFilter(DispatcherFilter.java:60) ~[spring-boot-devtools-2.2.6.RELEASE.jar:2.2.6.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:158) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at com.appfarms.app.common.security.ratelimiter.RateLimitFilter.doFilterInternal(RateLimitFilter.kt:41) ~[main/:?]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at com.appfarms.app.common.security.jwt.JwtAuthenticationFilter.doFilterInternal(JwtAuthenticationFilter.kt:61) ~[main/:?]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:92) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:77) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:109) ~[spring-boot-actuator-2.2.6.RELEASE.jar:2.2.6.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.33.jar:9.0.33]
    	at java.lang.Thread.run(Thread.java:830) [?:?]
    
    
    invalid 
    opened by SR-Lut3t1um 16
  • Kotlin Support ?

    Kotlin Support ?

    When generating the documentation It is not marking non nullable types as required. As I was not able to any information if kotlin is supported, I would like to know if kotlin is not supported or am I missing something?

    I could not get the fields to show up as required with @Nonnull or @Schema(required=true) as well.

    opened by DavidRomao 16
  • using https

    using https

    Given that the current url for swagger-ui uses https. Then the generated server url still uses http.

    Bildschirmfoto von 2019-10-16 11-58-42

    So executing an api-call fails. The Request URL uses http. TypeError: Failed to fetch

    Bildschirmfoto von 2019-10-16 12-07-39

    Any idea how to get it work?

    question 
    opened by octopus-prime 16
  • Provide a WebMvc.fn / WebFlux.fn functional DSL

    Provide a WebMvc.fn / WebFlux.fn functional DSL

    Hey,

    Thanks for creating this project. As a follow-up of #546 created by @nlochschmidt, where you added support for Spring web functional DSLs with a mix of Visitor patterns and annotations like @RouterOperations and @RouterOperation, I am wondering if you would be interested to explore the possibility to provide an alternative functional API to these annotations that could be used with the router DSL.

    I am not an OpenAPI guru, but I tend to think that programmatic APIs and method references could allow springdoc-openapi to provide an API more consistent with WebMvc.fn / WebFlux.fn mindset, with more compile-time checks and avoiding mixing too much annotation and functional paradigms. That would also allow functional Spring applications like the one incubated in https://github.com/spring-projects-experimental/spring-fu that I created to use springdoc-openapi.

    I am not sure yet what it would look like, but if you are interested to move forward this idea, I will be happy to provide some insights on the Spring Framework side of things, on Kotlin related DSLs, or even discuss potential missing extension points. It could also be potentially interesting to compare external versus "in the router" OpenAPI meta information definition.

    Any thoughts?

    enhancement 
    opened by sdeleuze 15
  • No operations defined in spec!

    No operations defined in spec!

    Hi, So I attempted to follow the getting started guide, and get inspiration from the sample projects, however for some reason my endpoint or models are not visible on the swagger UI, instead I'm faced with "No operations defined in spec!"

    I would appreciate any tips to what I've might have missed :)

    My controller/interface:

    @Tag(name = "Test", description = "Just a test endpoint")
    @RequestMapping(value = DEFAULT_PATH, produces = APPLICATION_JSON_VALUE)
    @RestController
    public interface TestEndpoint {
        String DEFAULT_PATH = "/test";
    
        String ID = "/{test-id}";
    
        @Operation(
                description = "Get test by test-id",
                summary = "Get test summary"
        )
        @ResponseStatus(code = HttpStatus.OK)
        @ApiResponses({
                @ApiResponse(
                        responseCode = HttpURLConnection.HTTP_OK + "",
                        description = "The request succeeded.",
                        content = @Content(schema = @Schema(implementation = TestModel.class))
                )
        })
        @GetMapping(value = ID)
        TestModel getAgreement(@Parameter(description = "Id of the test", required = true) @PathVariable("test-id") Long testId);
    }
    

    Application properties:

    server.port=8090
    [email protected]@
    [email protected]@
    springdoc.packages-to-scan=*
    springdoc.paths-to-match=/*
    

    My application runner

    @SpringBootApplication
    public class AuthApplication {
    
        @Bean
        public OpenAPI springShopOpenAPI(@Value("${application-version}") String appVersion) {
            return new OpenAPI()
                    .info(new Info().title("HoN Core Auth API")
                            .description("Authentication & authorization API")
                            .version(appVersion)
                            .license(new License().name("(C) HoN")));
        }
    
    //    @Bean
    //    public GroupedOpenApi publicApi() {
    //        String[] paths = {TestEndpoint.DEFAULT_PATH.concat("/**")};
    //        return GroupedOpenApi.builder()
    //                .group("public")
    //                .pathsToMatch(paths)
    //                .build();
    //    }
    
        public static void main(String[] args) {
            SpringApplication.run(AuthApplication.class, args);
        }
    
    }
    

    My model:

    @Schema(description = "This model represents a test result")
    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    @Builder
    @Data
    public class TestModel {
        @Schema(description = "Test description", example = "First test case")
        String description;
    
        @Schema(description = "Test id", example = "1", required = true)
        @NotNull
        Long id;
    
        @Schema(description = "Was the test a success", example = "true", required = true)
        @NotNull
        Boolean isSuccess;
    }
    
    invalid 
    opened by mikt 14
  • Missing extension to schema property

    Missing extension to schema property

    Hi @bnasslahsen ,

    Please see https://github.com/teq-niq/sample/tree/extending3 In the person schema for worth field am expecting a extension x-Currency with value USD. I am trying to show using swagger extensions validation constraints that swagger or springdoc might not be showing. This includes even custom constraints.

    In springdoc-openapi-webmvc-core\src\main\java\org\springdoc\webmvc\api\OpenApiResource.java I debugged this method - openapiJson()

    I can see the extension with correct value in this object OpenAPI openAPI = this.getOpenApi();

    But the extension is missing in the api-docs json. The other extensions are all appearing properly. problem

    Attaching the json txt: json.txt

    Raghu

    bug 
    opened by raghuraman1 14
  • Provide Customizers for Path, PathItem, Schemas, (and all OAS components)

    Provide Customizers for Path, PathItem, Schemas, (and all OAS components)

    Is your feature request related to a problem? Please describe.

    • A clear and concise description of what the problem is. Ex. I'm always frustrated

    Dynamically exposing APIs using an Operation's extensions, as recommended here can be an expensive process since traversing the OAS tree to fetch an Operatoin's parent Path/PathItems can only be done top-down. Customizers that springdoc provides, such as the OperationCustomizer is a useful way to directly access the Operation components directly prior to the OAS is being generated. Customizers are not supported for every OAS component, however, resulting in expensive processing to hide associated Path, PathItem, Operations, and Schemas as defined by the singular Operation extension.

    • What is the actual result using OpenAPI Description (yml or json)?

    Should support both yaml and json but no result is needed to describe the output besides being valid.

    Describe the solution you'd like

    • A clear and concise description of what you want to happen.

    Customizers should be provided for all OAS components, especially for Path, PathItem, and Schema components.

    Describe alternatives you've considered

    • A clear and concise description of any alternative solutions or features you've considered.

    I've implemented a solution, that unfortunately I cannot share, by iterating through the entire OAS tree. This process is expensive though and I am looking for a way that is more efficient and consistent with what Springdoc already provides support for.

    Additional context

    • Add any other context or screenshots about the feature request here.

    N/A

    opened by BillyBolton 0
  • Path variable mapped improperly in swagger-ui

    Path variable mapped improperly in swagger-ui

    Describe the bug

    I have simple controller in Kotlin

        @Operation(summary = "Get company details", description = "Get company details")
        fun getCompanyDetails(@PathVariable companyId: Long): ResponseEntity<CompanyDTO> {
            val company = companyService.getCompanyByIdOrException(companyId)
            return ResponseEntity.ok(company.toDto())
        }
    

    After upgrading to Spring-boot 3.0.1 and springdoc-openapi 2.0.2 I see arg0 in swagger ui rather than companyId in the ui

    image

    And when trying it out i get 404:

      "message": "Failed to convert value of type 'java.lang.String' to required type 'long'; For input string: \"{companyId}\"",
      "path": "/api/evans-admin/companies/%7BcompanyId%7D/scheme-admins"
    

    as you can see rather than using given value %7BcompanyId%7D string is being used

    opened by matios13 0
  • Recognize sealed classes

    Recognize sealed classes

    This is a request for an extension of an existing feature, without breaking backward compability.

    Polymorphism in OpenAPI is pretty straight-forward, but verbose. SpringDoc may (I am not aware that it does) figure out class hierarchies in parameters and responses, but for sure (just checked it) it doesn't recognizes the sealed types. An example follows.

    Given situation like:

    interface ObjectPointer {}
    record ObjectId(String id) implements ObjectPointer {}
    record ObjectCoordinates(String path, String name) implements ObjectPointer {}
    record ObjectQuery(ObjectPointer pointer, Criteria criteria) {} 
    

    if I declare an endpoint like:

    @PostMapping(...)
    Flux<ObjectRepresentation> fetchObjects(Flux<ObjectQuery> queries){...}
    

    and in cases when I seal the ObjectPointer:

    sealed interface ObjectPointer permits ObjectId, ObjectCoordinates {}
    

    I still need to annotate it with schema:

    @Schema(anyOf={ObjectId.class, ObjectCoordinates.class})
    sealed interface ObjectPointer permits ObjectId, ObjectCoordinates {}
    //ditto with non-sealed
    

    Without it, the ObjectPointer has no anyOf in the YAML, even though both ObjectId and ObjectCoordinates are represented too.

    In case of non-sealed types, it is quite obvious and makes sense - there is no point in doing expensive scan of available classes to try and figure out the hierarchy (or bring in some nifty dependencies).

    In case of sealed classes though...

    Describe the solution you'd like

    I would like the @Schema(anyOf=...) to be derived automatically. To recognize sealed classes we can use Class.isSealed(), while to find out the permitted subtypes we can use Class.getPermittedSubclasses()

    Notice that this feature should cover all the types that are represented in the YAML - parameters, responses, components, etc.

    In my opinion, in case of "tiered" sealed types, we should represent tiering in the YAML. In other words, given:

    sealed interface A permits B, C {}
    record B ... implements A ...
    sealed interface C permits D, E {}
    record D ... implements C ...
    record E ... implements C ...
    

    I DO expect that types are represented as:

    A=anyOf(ref:B, ref:C)
    C=anyOf(ref:D, ref:E)
    

    and I expect that we DON'T represent them as

    A=anyOf(ref:B, ref:D, ref:E)
    

    There is still a question of unsealed subhierarchies. Given

    sealed interface A permits B, C {}
    record B ... implements A ...
    non-sealed interface C extends A {}
    record D ... implements C ...
    class E implements C ...
    

    I DO expect:

    A=anyOf(B, C)
    

    and I DON'T expect:

    A=anyOf(B, C)
    C=anyOf(D, E /* and what else?*/)
    

    In other words, I expect SpringDoc to follow the types "permits" clauses and stop traversing the tree branch as soon as it hits non-sealed or final type. Subtyping of non-sealed types should follow the rules that applied before (so, C should behave like unannotated ObjectPointer in the initial example).

    Describe alternatives you've considered

    None, doesn't really apply

    Additional context

    • The example is formulated that way (with additional level of indirection), because that's how I've noticed that issue; this ticket will become a bug in the worst case
      • I understand that this isn't the nicest API and definitely not RESTful. Remember that what you see is what I wrote stripped of almost everything (and then I made names generic "Object..." instead of "(term from my domain)...").
    • This would require Java version that supports sealed types (so, 15 with preview, or... 16? 17 definitely supports it as stable feature). While keeping low minimum requirements is usually a good idea, this framework is targeted at Spring, which with its new release (3.x) set minimum Java to 17.
    opened by FilipMalczak 0
  • springdoc-openapi-kotlin support for spring-boot3

    springdoc-openapi-kotlin support for spring-boot3

    Hello there,

    Problem

    Unless I'm way off, I cannot seem to make springdoc-openapi for kotlin work with spring-boot 3.0.x.

    Dependencies:

    <dependency>
    	<groupId>org.springframework.boot</groupId>
    	<artifactId>spring-boot-starter-webflux</artifactId>
    	<version>3.0.1</version>
    </dependency>
    
    <dependency>
    	<groupId>org.springdoc</groupId>
    	<artifactId>springdoc-openapi-kotlin</artifactId>
    	<version>1.6.14</version> <!-- latest I could find -->
    </dependency>
    
    <dependency>
    	<groupId>org.springdoc</groupId>
    	<artifactId>springdoc-openapi-starter-webflux-ui</artifactId>
    	<version>2.0.2</version>
    </dependency>
    

    Stacktrace

    ***************************
    APPLICATION FAILED TO START
    ***************************
    
    Description:
    
    An attempt was made to call a method that does not exist. The attempt was made from the following location:
    
        org.springdoc.webflux.ui.SwaggerWelcomeCommon.<init>(SwaggerWelcomeCommon.java:65)
    
    The following method did not exist:
    
        'void org.springdoc.ui.AbstractSwaggerWelcome.<init>(org.springdoc.core.properties.SwaggerUiConfigProperties, org.springdoc.core.properties.SpringDocConfigProperties, org.springdoc.core.properties.SwaggerUiConfigParameters)'
    
    The calling method's class, org.springdoc.webflux.ui.SwaggerWelcomeCommon, was loaded from the following location:
    
        jar:file:/Users/me/.m2/repository/org/springdoc/springdoc-openapi-starter-webflux-ui/2.0.2/springdoc-openapi-starter-webflux-ui-2.0.2.jar!/org/springdoc/webflux/ui/SwaggerWelcomeCommon.class
    
    The called method's class, org.springdoc.ui.AbstractSwaggerWelcome, is available from the following locations:
    
        jar:file:/Users/me/.m2/repository/org/springdoc/springdoc-openapi-common/1.6.14/springdoc-openapi-common-1.6.14.jar!/org/springdoc/ui/AbstractSwaggerWelcome.class
        jar:file:/Users/me/.m2/repository/org/springdoc/springdoc-openapi-starter-common/2.0.2/springdoc-openapi-starter-common-2.0.2.jar!/org/springdoc/ui/AbstractSwaggerWelcome.class
    
    The called method's class hierarchy was loaded from the following locations:
    
        org.springdoc.ui.AbstractSwaggerWelcome: file:/Users/me/.m2/repository/org/springdoc/springdoc-openapi-common/1.6.14/springdoc-openapi-common-1.6.14.jar
    

    Action

    Would it be possible to release a version of springdoc-openapi-kotlin compatible with spring-boot3?

    Thanks for the great lib! :)

    opened by gdinant 1
  • Wrong response from /api-docs while using native image and functional endpoints

    Wrong response from /api-docs while using native image and functional endpoints

    Describtion

    I wanted to generate the OpenAPI specification while using the native image provided by Spring Boot 3. Unfortunately, the request send to http://localhost:8080/v3/api-docs returns two different responses depending on the fact if the native image is used or not. Probably it is connected to the fact that I am using Spring WebFlux and functional endpoints. The UI is generated by native-image thanks to enable-native-support = true but its content is empty due to the wrong response from api-docs

    Dependencies

    • Spring Boot: 3.0.1
    • spring-boot-starter-webflux 3.0.1
    • springdoc-openapi-starter-webflux-ui 2.0.2
    • GraalVM Community 22.3 JDK19

    Example code

    Router.java:

    @Configuration
    public class Router {
        @RouterOperation(
                path = "/hello-world",
                method = RequestMethod.GET,
                beanClass = ReactiveController.class,
                beanMethod = "helloWorld",
                produces = "application/json"
        )
        @Bean
        RouterFunction<ServerResponse> getUniversityRoute(ReactiveController controller) {
            return route(GET("/hello-world"), controller::helloWorld);
        }
    }
    

    ReactiveController.java:

    @RestController
    public class ReactiveController {
    
    
        @Operation(
                operationId = "hello-world",
                tags = "Hello",
                description = "Hello world",
                summary = "Hello World",
                responses = {
                        @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class)))
                }
        )
        public Mono<ServerResponse> helloWorld(ServerRequest request) {
            return ServerResponse.ok()
                                 .contentType(MediaType.APPLICATION_JSON)
                                 .body(BodyInserters.fromValue("{ \"response\": \"Hello World!\"}"));
        }
    }
    

    application.yaml:

    springdoc:
      enable-native-support: true
    

    Responses:

    Response from http://localhost:8080/v3/api-docs using the native image:

    {
       "openapi":"3.0.1",
       "info":{
          "title":"OpenAPI definition",
          "version":"v0"
       },
       "servers":[
          {
             "url":"http://localhost:8080",
             "description":"Generated server url"
          }
       ],
       "paths":{
          
       },
       "components":{
          
       }
    }
    

    Response from http://localhost:8080/v3/api-docs not using the native image:

    {
       "openapi":"3.0.1",
       "info":{
          "title":"OpenAPI definition",
          "version":"v0"
       },
       "servers":[
          {
             "url":"http://localhost:8080",
             "description":"Generated server url"
          }
       ],
       "paths":{
          "/hello-world":{
             "get":{
                "tags":[
                   "Hello"
                ],
                "summary":"Hello World",
                "description":"Hello world",
                "operationId":"hello-world",
                "responses":{
                   "200":{
                      "description":"OK",
                      "content":{
                         "application/json":{
                            "schema":{
                               "type":"string"
                            }
                         }
                      }
                   }
                }
             }
          }
       },
       "components":{
          
       }
    }
    

    UI: UI

    Expected behaviour

    The response should be the same. The functional endpoints should be included in the specification

    opened by Szczepaniak-M 0
  • Using springdoc with the Actuator integration causes a deprecation warning

    Using springdoc with the Actuator integration causes a deprecation warning

    Describe the bug

    Steps to reproduce the behavior:

    • What version of spring-boot you are using? Spring Boot 3.0.1, however, this warning is issued since 2.1.0.
    • What modules and versions of springdoc-openapi are you using? Springdoc version 2.0.2 with springdoc-openapi-starter-webmvc-ui
    • What is the actual and the expected result using OpenAPI Description (yml or json)? not applicable

    When using the default configuration for springdoc for the actuator integration a deprecation warning is triggered that complains about invalid characters.

    To Reproduce

    application.yml

    springdoc:
      api-docs:
        enabled: true
      swagger-ui:
        enabled: true
      show-actuator: true
      use-management-port: true
    
    management:
      endpoints:
        enabled-by-default: true
        web:
          exposure:
            include: [ "openapi", "swagger-ui" ]
    
    WARN o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'swagger-ui' contains invalid characters, please migrate to a valid format.
    

    Expected behavior

    No warning should be issued.

    opened by Okeanos 0
Releases(v2.0.2)
  • v2.0.2(Dec 16, 2022)

    Fixed

    • #2008 - Error when com.fasterxml.jackson.module.kotlin.KotlinModule is not present in classpath

    Full Changelog: https://github.com/springdoc/springdoc-openapi/compare/v2.0.1...v2.0.2

    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Dec 16, 2022)

    Added

    • #1965 - Prevents premature initialisation of factory-beans
    • #2003 - Resolve property descriptions for arrays

    Fixed

    • #1957 - AdditionalModelsConverter Schema params rewriting
    • #1962 - override-with-generic-response shouldn't shallow copy
    • #1985 - IllegalStateException: Duplicate key when two endpoints at the same URL with same header exist
    • #1992 - Java enumeration and Spring Converter no longer generates enum drop-down
    • #2001 - Enum Collection parameter missing type info in Spring Data Rest search method
    • #1961 - ContinuationObject leaks into schema

    New Contributors

    • @krupt made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1959

    Full Changelog: https://github.com/springdoc/springdoc-openapi/compare/v2.0.0...v2.0.1

    Source code(tar.gz)
    Source code(zip)
  • v1.6.14(Dec 16, 2022)

    Added

    • #1965 - Prevents premature initialisation of factory-beans
    • #2003 - Resolve property descriptions for arrays

    Changed

    • Upgrade spring-boot to 2.7.6

    Fixed

    • #1957 - AdditionalModelsConverter Schema params rewriting
    • #1962 - override-with-generic-response shouldn't shallow copy
    • #1985 - IllegalStateException: Duplicate key when two endpoints at the same URL with same header exist
    • #1992 - Java enumeration and Spring Converter no longer generates enum drop-down.
    • #2001 - Enum Collection parameter missing type info in Spring Data Rest search method

    New Contributors

    • @jorgerod made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1969
    • @danrose499 made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1982
    • @Mumeii made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1975
    • @ParkerM made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/2002

    Full Changelog: https://github.com/springdoc/springdoc-openapi/compare/v1.6.13...v1.6.14

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Nov 24, 2022)

  • v2.0.0-RC2(Nov 20, 2022)

    Added

    • #1929 - Enables no cache on not cache swagger-initializer.js
    • #1922 - Check existence of superclass before accessing its name
    • #1923 - Javadoc description of the @RequestPart param of multipart/form-data to the parameter description

    Changed

    • Upgrade spring-boot to 3.0.0-RC2
    • Upgrade swagger-core to 2.2.7
    • Upgrade swagger-ui to 4.15.5
    • #1912 - Upgrade spring-security-oauth2 to 2.5.2.RELEASE

    Fixed

    • #1892 - springdoc.model-and-view-allowed enhanced
    • #1909 - ExceptionHandler in controller is not used by another controller
    • #1904 - springdoc-openapi-webflux-ui 2.0.0-M7 + spring actuator + spring cloud crashes at startup
    • #1911 - Wrong type for springdoc.swagger-ui.oauth.useBasicAuthenticationWithAccessCodeGrant configuration property
    • #1931 - Spring Security form login only offers application/json req body type.

    Full Changelog: https://github.com/springdoc/springdoc-openapi/compare/v2.0.0-RC1...v2.0.0-RC2

    Source code(tar.gz)
    Source code(zip)
  • v1.6.13(Nov 20, 2022)

    Added

    • #1929 - Enables no cache on not cache swagger-initializer.js
    • #1922 - Check existence of superclass before accessing its name
    • #1923 - Javadoc description of the @RequestPart param of multipart/form-data to the parameter description

    Changed

    • Upgrade spring-boot to 2.7.5
    • Upgrade swagger-core to 2.2.7
    • Upgrade swagger-ui to 4.15.5
    • #1912 - Upgrade spring-security-oauth2 to 2.5.2.RELEASE

    Fixed

    • #1892 - springdoc.model-and-view-allowed enhanced
    • #1901 - When @Get, using @Parameter over the method results in duplicate of the same parameter
    • #1909 - ExceptionHandler in controller is not used by another controller
    • #1904 - springdoc-openapi-webflux-ui 2.0.0-M7 + spring actuator + spring cloud crashes at startup
    • #1911 - Wrong type for springdoc.swagger-ui.oauth.useBasicAuthenticationWithAccessCodeGrant configuration property
    • #1931 - Spring Security form login only offers application/json req body type

    New Contributors

    • @ahmedalnuaimi made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1903
    • @JaneQ9900 made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1912
    • @cyuyang made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1922

    Full Changelog: https://github.com/springdoc/springdoc-openapi/compare/v1.6.12...v1.6.13

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-RC1(Oct 23, 2022)

    Added

    • #1284 - Additional hints for native support

    Changed

    • Upgrade to spring-boot 3.0.0-RC1
    • Upgrade swagger-ui to 4.15.0

    Fixed

    • #1901 - When @Get, using @Parameter over the method results in duplicate of the same parameter.
    • #1892 - springdoc.model-and-view-allowed.

    Full Changelog: https://github.com/springdoc/springdoc-openapi/compare/v2.0.0-M7...v2.0.0-RC1

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-M7(Oct 16, 2022)

    Added

    • #1888 - custom Summary for actuator
    • #1881 - Support @Hidden annotation on REST repositories.
    • #1878 - Sort request methods

    Changed

    • Upgrade swagger-core to 2.2.4
    • Upgrade swagger-ui to 4.14.3

    Fixed

    • #1829 - Wrong schema generation on endpoint consuming multipart form data combined with JsonView
    • #1842 - A HTTP header in multipart/form-data is handled as form item instead of header
    • #1845 - Wrong "response" description with two controllers having its own ExceptionHandler.
    Source code(tar.gz)
    Source code(zip)
  • v1.6.12(Oct 16, 2022)

    Added

    • #1888 - custom Summary for actuator
    • #1881 - Support @Hidden annotation on REST repositories.
    • #1878 - Sort request methods
    • #1830 - Support Java record
    • #1814 - Allow requestBody creation for GET on openapi resource endpoint

    Changed

    • Upgrade swagger-core to 2.2.4
    • Upgrade spring-boot to 2.7.4
    • Upgrade swagger-ui to 4.14.3

    Fixed

    • #1829 - Wrong schema generation on endpoint consuming multipart form data combined with JsonView
    • #1842 - A HTTP header in multipart/form-data is handled as form item instead of header
    • #1845 - Wrong "response" description with two controllers having its own ExceptionHandler.
    • #1855 - Fixed a bug that duplicate field were get for record classes.
    • #1820 - Refresh the browser each time, the global header is added in duplicate.
    • #523 - No documented way to handle Mono/Flux without Webflux.
    • #1816 - Parameters with same name but different locations can't render in UI properly

    New Contributors

    • @okohub made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1814
    • @sbernardo made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1888
    • @yotam2010 made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1878

    Full Changelog: https://github.com/springdoc/springdoc-openapi/compare/v1.6.11...v1.6.12

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-M6(Oct 16, 2022)

    Added

    • #1860 - Replace auto-configuration registration by @eikemeier in https://github.com/springdoc/springdoc-openapi/pull/1860
    • #1814 - Allow requestBody creation for GET on openapi resource endpoint

    Fixed

    • 1855 -Fixed a bug that duplicate field were get for record classes by @uc4w6c in https://github.com/springdoc/springdoc-openapi/pull/1855
    • #1820 - Refresh the browser each time, the global header is added in duplicate.
    • #523 - No documented way to handle Mono/Flux without Webflux
    • #1816 - Parameters with same name but different locations can't render in UI properly

    New Contributors

    • @eikemeier made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1860

    Full Changelog: https://github.com/springdoc/springdoc-openapi/compare/v2.0.0-M5...v2.0.0-M6

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-M5(Oct 16, 2022)

    Added

    • #1805 - Default flat param object

    Changed

    • upgrade swagger-ui: 4.14.0

    Fixed

    • #1801 - Duplicated header values when an endpoint can be called with different headers
    • #1801 - NPE for request bodies with content that has media type MULTIPART_FORM_DATA_VALUE
    • #1793 - Query parameter part of request body in controller with MultiPartFile
    • #1791 - Override-with-generic-response not working from 1.6.8 onwards
    • #1799 - Polymorphism - Support JsonTypeInfo.Id.CLASS

    Full Changelog: https://github.com/springdoc/springdoc-openapi/compare/v2.0.0-M4...v2.0.0-M5

    Source code(tar.gz)
    Source code(zip)
  • v1.6.11(Aug 21, 2022)

    [1.6.11] - 2022-08-21

    Added

    • #1805 - Default flat param object

    Changed

    • upgrade swagger-ui: 4.14.0

    Fixed

    • #1801 - Duplicated header values when an endpoint can be called with different headers
    • #1801 - NPE for request bodies with content that has media type MULTIPART_FORM_DATA_VALUE
    • #1793 - Query parameter part of request body in controller with MultiPartFile
    • #1791 - Override-with-generic-response not working from 1.6.8 onwards
    • #1799 - Polymorphism - Support JsonTypeInfo.Id.CLASS
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-M4(Oct 16, 2022)

    Added

    • #1700 - Support PageableDefault#value()
    • #1706 - ßAdd RouterOperationCustomizer
    • #1754 - Default value and description of the page parameter when enabled spring.data.web.pageable.one-indexed-parameters property
    • #1755 - Adjust name of the parameters page and size when set spring.data.web.pageable.prefix property
    • #1742 - Optimize the group order problem

    Changed

    • update to spring-boot 3.0.0-M4
    • upgrade swagger-ui: 4.13.2
    • upgrade classgraph: 4.8.149
    • upgrade spring-native: 0.12.1
    • upgrqde swagger-core: 2.2.2
    • upgrage therapi-runtime-javadoc: 0.15.0
    • #1753 - Upgrade Spring Cloud Function to 4.0.0-M3 by @JohnNiang in https://github.com/springdoc/springdoc-openapi/pull/1753

    Fixed

    • #1684 - incorrect generic param for multi interfaces
    • #1687, #1688 - kotlin ByteArray property incorrect
    • #1692 - More specific bean name for objectMapperProvider
    • #1684 - Incorrect generic param for multi interfaces
    • #1707 - Concurrent problems when initializing multiple GroupedOpenApi parallelly
    • #1690 - Expected file to be in alphabetical order.
    • #1713 - ObjectMapperProvider to sort all properties.
    • #1717, #1718 - javadoc of JsonUnwrapped fields not set
    • #1748, #1712, Generated server url computation not cleared
    • #1696 - incorrect generic param for multi interfaces
    • #1749 - Update server out of cache
    • #1734 - springdoc-openapi-kotlin and springdoc-openapi-common do not agree on conditions for auto configuration
    • #1761- Exception documenting RestControllerEndpoint with PostMapping

    New Contributors

    • @JohnNiang made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1753
    Source code(tar.gz)
    Source code(zip)
  • v1.6.10(Aug 15, 2022)

    Added

    • #1700 - Support PageableDefault#value()
    • #1706 - ßAdd RouterOperationCustomizer
    • #1754 - Default value and description of the page parameter when enabled spring.data.web.pageable.one-indexed-parameters property
    • #1755 - Adjust name of the parameters page and size when set spring.data.web.pageable.prefix property
    • #1742 - Optimize the group order problem

    Changed

    • upgrade to spring-boot 2.7.2
    • upgrade swagger-ui: 4.13.2
    • upgrade classgraph: 4.8.149
    • upgrade spring-native: 0.12.1
    • upgrqde swagger-core: 2.2.2
    • upgrage therapi-runtime-javadoc: 0.15.0

    Fixed

    • #1684 - incorrect generic param for multi interfaces
    • #1687, #1688 - kotlin ByteArray property incorrect
    • #1692 - More specific bean name for objectMapperProvider
    • #1684 - Incorrect generic param for multi interfaces
    • #1707 - Concurrent problems when initializing multiple GroupedOpenApi parallelly
    • #1690 - Expected file to be in alphabetical order.
    • #1713 - ObjectMapperProvider to sort all properties.
    • #1717, #1718 - javadoc of JsonUnwrapped fields not set
    • #1748, #1712, Generated server url computation not cleared
    • #1696 - incorrect generic param for multi interfaces
    • #1749 - Update server out of cache
    • #1734 - springdoc-openapi-kotlin and springdoc-openapi-common do not agree on conditions for auto configuration
    • #1761- Exception documenting RestControllerEndpoint with PostMapping
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-M3(Oct 16, 2022)

    Added

    • #1664 - Add Schema properties support in method-level @RequestBody
    • #1181 - Initial OpenAPI 3.1 support
    • #1651 - Ease group declaration through code or properties with actuators
    • #1616 - Add global customizer and filters
    • #1620 - Allow ComposedSchemas to replace non-composed so we can respect polymorphic links discovered in later methods
    • #1579 - Updated class and method javadoc handling
    • #1647 - Support for Webflux springdoc behind a proxy v2.x by @wiiitek in https://github.com/springdoc/springdoc-openapi/pull/1647
    • upgrade classgraph: 4.8.147
    • upgrade spring-native: 0.11.5
    • upgrade spring-cloud-function: 3.2.4
    • #1603 - Update swagger-ui path from /swaggerui to /swagger-ui when using management port (actuator) .
    • Prefer ComposedSchemas over non-composed so that method name order doesn't prevent polymorphic links generating into the spec

    Changed

    • Update to spring-boot 3.0.0-M3

    Fixed

    • #1663 - @Schema annotation with type String and allowableValues set doesn't generate enum drop-down in swagger-ui after upgrading from 1.6.6 (when Spring custom converter is used)
    • #1655 - OpenAPIService is using ObjectMapper without configured modules since SpringDoc 1.6.7.
    • #1648 - Tags with only name provided are being added to the openAPI.tags field.
    • #1641 - ConcurrentModificationException when querying /v3/api-docs/{group} concurrently for different groups
    • #1634 - Generating doc for entities with map attribute does not work
    • #1633 - GroupedOpenApi.builder addOpenApiCustomiser execution order is reversed
    • #1630 - Remove repeated HttpSession
    • #1659 - fix oauth redirection when used in spring-native
    • #1621 - Redirection to UI broken with query-config-enabled when any other boolean parameter is defined.
    • #1617 - spring cloud stream crashes at startup.
    • #1605 - spring-native NullPointerException due to missing TypeHint

    Full Changelog: https://github.com/springdoc/springdoc-openapi/compare/v2.0.0-M2...v2.0.0-M3

    Source code(tar.gz)
    Source code(zip)
  • v1.6.9(May 27, 2022)

    Added

    • #1664 - Add Schema properties support in method-level @RequestBody
    • #1181 - Initial OpenAPI 3.1 support
    • #1651 - Ease group declaration through code or properties with actuators

    Changed

    • upgrade to spring-boot 2.7.0
    • upgrade swagger-ui: 4.11.1
    • upgrade classgraph: 4.8.147
    • upgrade spring-native: 0.11.5
    • upgrade spring-cloud-function: 3.2.4

    Fixed

    • #1663 - @Schema annotation with type String and allowableValues set doesn't generate enum drop-down in swagger-ui after upgrading from 1.6.6 (when Spring custom converter is used)
    • #1655 - OpenAPIService is using ObjectMapper without configured modules since SpringDoc 1.6.7.
    • #1648 - Tags with only name provided are being added to the openAPI.tags field.
    • #1641 - ConcurrentModificationException when querying /v3/api-docs/{group} concurrently for different groups
    • #1634 - Generating doc for entities with map attribute does not work
    • #1633 - GroupedOpenApi.builder addOpenApiCustomiser execution order is reversed
    • #1630 - Remove repeated HttpSession
    • #1659 - fix oauth redirection when used in spring-native
    Source code(tar.gz)
    Source code(zip)
  • v1.6.8(Apr 22, 2022)

    Added

    • #1616 - Add global customizer and filters
    • #1620 - Allow ComposedSchemas to replace non-composed so we can respect polymorphic links discovered in later methods
    • #1579 - Updated class and method javadoc handling

    Changed

    • upgrade to spring-boot 2.6.7
    • #1603 - Update swagger-ui path from /swaggerui to /swagger-ui when using management port (actuator) .
    • Prefer ComposedSchemas over non-composed so that method name order doesn't prevent polymorphic links generating into the spec

    Fixed

    • #1621 - Redirection to UI broken with query-config-enabled when any other boolean parameter is defined.
    • #1617 - spring cloud stream crashes at startup.
    • #1605 - spring-native NullPointerException due to missing TypeHint
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-M2(Oct 16, 2022)

    Added

    • #1596 - Add title property to GroupedOpenApi class for displaying a Human readable group name.
    • #1554 - Configurable caching of OpenAPI instances.
    • #1544 - @Deprecated on controller to mark all its operations as deprecated.
    • #1534 - Support custom Spring type converters.
    • #1543 - Add method to retrieve server base URL and ability to 'customize' the generated server base URL.
    • #1505 - Support swagger-ui.withCredentials property.
    • #1481 - Include /oauth/token endpoint using OpenApi Swagger 1.6.5.
    • #1501 - Added CSRF Session Storage config properties and html transformer.
    • #1498 - Pick up exception handler in case there is no controller advice at all.

    Changed

    • update to spring-boot 3.0.0-M2
    • upgrade to swagger-api 2.2.0 and swagger-ui 4.10.3
    • spring-native upgrade to 0.11.4
    • classgraph upgrade to 4.8.143
    • Update webjars-locator-core to 0.50
    • add owasp dependency-check-maven plugin

    Fixed

    • #1586 - Typo in Pageable sort description.
    • #1570 - Remove unused dependencies.
    • #1565- Missing Request Body for Write Operation Actuator Endpoints.
    • #1522 - parameter of type com.querydsl.core.types.Predicate ignored when unique.
    • #1556 - oauth2RedirectUrl cached unexpectedly.
    • #1546 - Custom Requestmapping consumes responses.
    • #1552 - resolve-schema-properties is not replacing tokens from properties file.
    • #1530 - Setting displayOperationId to false does not work.
    • #1525 - Null vendor extensions are excluded from Json/Yaml.
    • #1469 - #1036 - CSRF header should not be sent to cross domain sites
    • #1480 - Fix the problem that the inconsistent newline characters of different platforms
    • #1475 - Class level @Tag overwrites method level @Operation.tags.
    • #1491 - Set containingClass at MethodParameter
    Source code(tar.gz)
    Source code(zip)
  • v1.6.7(Apr 7, 2022)

    Added

    • #1596 - Add title property to GroupedOpenApi class for displaying a Human readable group name.
    • #1554 - Configurable caching of OpenAPI instances.
    • #1544 - @Deprecatedon controller to mark all its operations as deprecated.
    • #1534 - Support custom Spring type converters.
    • #1543 - Add method to retrieve server base URL and ability to 'customize' the generated server base URL.
    • #1505 - Support swagger-ui.withCredentials property.
    • #1481 - Include /oauth/token endpoint using OpenApi Swagger 1.6.5.
    • #1501 - Added CSRF Session Storage config properties and html transformer.
    • #1498 - Pick up exception handler in case there is no controller advice at all.

    Changed

    • upgrade to swagger-api 2.2.0 and swagger-ui 4.10.3
    • spring-native upgrade to 0.11.4
    • upgrade spring-boot version to 2.6.6
    • classgraph upgrade to 4.8.143
    • Update webjars-locator-core to 0.50
    • add owasp dependency-check-maven plugin

    Fixed

    • #1586 - Typo in Pageable sort description.
    • #1570 - Remove unused dependencies.
    • #1565- Missing Request Body for Write Operation Actuator Endpoints.
    • #1522 - parameter of type com.querydsl.core.types.Predicate ignored when unique.
    • #1556 - oauth2RedirectUrl cached unexpectedly.
    • #1546 - Custom Requestmapping consumes responses.
    • #1552 - resolve-schema-properties is not replacing tokens from properties file.
    • #1530 - Setting displayOperationId to false does not work.
    • #1525 - Null vendor extensions are excluded from Json/Yaml.
    Source code(tar.gz)
    Source code(zip)
  • v1.6.6(Feb 6, 2022)

    Changed

    • #1424 - Upgrade to swagger-ui 4.5.0
    • #1474 - Upgrade webjars-locator-core version to 0.48

    Fixed

    • #1469 - #1036 - CSRF header should not be sent to cross domain sites
    • #1480 - Fix the problem that the inconsistent newline characters of different platforms
    • #1475 - Class level @Tag overwrites method level @Operation.tags.
    • #1491 - Set containingClass at MethodParameter
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-M1(Feb 6, 2022)

    Added

    • #1284 - Initial support for Jakarta EE
    • #1430 - support custom login processing endpoints by @lipniak in https://github.com/springdoc/springdoc-openapi/pull/1430
    • #1429 - Allow excluding individual methods from OpenApi output by @mc1arke in https://github.com/springdoc/springdoc-openapi/pull/
    • #1372 - Customize operation and parameters by the return value
    • #1453 - Reverse proxy context path aware support for manually provided files

    Changed

    • update to spring-boot 3.0.0-M1
    • #1424 - Upgrade to swagger-ui 4.5.0
    • #1474 - Upgrade webjars-locator-core version to 0.48

    Fixed

    • #1428 - Incorrect RequestBody type on schema/ui if class implements Map.
    • #1455 - Post without @RequestBody not getting all fields
    • #1442 - Springdoc-openapi-webmvc-core not enought for Springdoc-openapi-native
    • #1446 - Upgrade from Springdoc 1.6.3 to 1.6.4 causes issues if springdoc-openapi-common is on the classpath but springdoc-openapi-ui is not
    • #1458 - java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getParameter() at /v3/api-docs request
    • #1469 - #1036 - CSRF header should not be sent to cross domain sites
    • #1480 - Fix the problem that the inconsistent newline characters of different platforms
    • #1475 - Class level @Tag overwrites method level @Operation.tags.
    • #1491 - Set containingClass at MethodParameter

    New Contributors

    • @lipniak made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1430
    • @mc1arke made their first contribution in https://github.com/springdoc/springdoc-openapi/pull/1429

    Full Changelog: https://github.com/springdoc/springdoc-openapi/compare/v1.6.4...v2.0.0-M1

    Source code(tar.gz)
    Source code(zip)
  • v1.6.5(Jan 25, 2022)

    Added

    • #1430 - Add Support custom login processing endpoints
    • #1429 - Allow excluding individual methods from OpenApi output
    • #1372 - Customize operation and parameters by the return value
    • #1453 - Reverse proxy context path aware support for manually provided files

    Changed

    • #1424 - Upgrade to swagger-ui 4.2.1

    Fixed

    • #1428 - Incorrect RequestBody type on schema/ui if class implements Map.
    • #1455 - Post without @RequestBody not getting all fields
    • #1442 - Springdoc-openapi-webmvc-core not enought for Springdoc-openapi-native
    • #1446 - Upgrade from Springdoc 1.6.3 to 1.6.4 causes issues if springdoc-openapi-common is on the classpath but springdoc-openapi-ui is not
    • #1458 - java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getParameter() at /v3/api-docs request
    Source code(tar.gz)
    Source code(zip)
  • v1.6.4(Jan 6, 2022)

    Added

    • Add support out of the box for MultipartRequest
    • #1418 - Support for therapi-runtime-javadoc 0.13.0.

    Changed

    • #1415 - Moving PageableDefault support to springdoc-openapi-common
    • #1424 - Update classgraph dependency to 4.8.138

    Fixed

    • #1407 - Fix issue number in 1.6.3 CHANGELOG
    • #1421 - Actuator endpoints have 2 appended to operationId
    • #1425 - Parameter 2 of method indexPageTransformer in org.springdoc.webmvc.ui.SwaggerConfig required a single bean, but 2 were found
    Source code(tar.gz)
    Source code(zip)
  • v1.6.3(Dec 25, 2021)

    Added

    • #1299 - Add support for Spring Cloud Function Web.

    Changed

    • Upgrade to swagger-core 2.1.12
    • Upgrade to spring-boot 2.6.2
    • Upgrade spring-native to 0.11.1
    • bump classgraph version to 4.8.117

    Fixed

    • #405 - Enhance springdoc-openapi as BOM for Gradle
    Source code(tar.gz)
    Source code(zip)
  • v1.6.2(Dec 19, 2021)

    Added

    • #1386, #1385 - Disable validation by default
    • #1384 - Enhance swagger-ui access

    Fixed

    • #1392 - Consistent OperationId generation problem with Locale
    • #1394 - Getting 404 when trying to access swagger-ui of a native spring-boot app
    Source code(tar.gz)
    Source code(zip)
  • v1.6.1(Dec 14, 2021)

  • v1.6.0(Dec 12, 2021)

    Added

    • #1356, #1360 - Add support for caching based on Locale
    • #1355 - Add support for @Tag description using i18n
    • #1376 - Add Support for Spring Native 0.11
    • #1365 - Make MediaType for "loginRequestBody" as "application/json"
    • #1375 - Support @JsonIgnore in @ParameterObject.
    • #1379 - Enable support for queryConfigEnabled. Disable reading config params from URL search params by default

    Changed

    • Upgrade swagger-ui to 4.1.3
    • Upgrade to spring-boot 2.6.1
    • #1373 - Enhance Pageable config

    Fixed

    • #1353 - Servers from cached OpenAPI are overwritten and customizer is skipped.
    • #1364 - Incorrect configUrl due to null path prefix
    • #1370 - NullPointerException on JavadocPropertyCustomizer.java:81 - Warning level
    Source code(tar.gz)
    Source code(zip)
  • v1.5.13(Nov 30, 2021)

    Added

    • #1317 - Add SpEL support for default values
    • #1324 - springdoc-openapi-javadoc doesn't work with @ParameterObject
    • #1334 - Allow customizing / disabling PolymorphicModelConverter
    • #1328 - Add support for spring-native 0.11-RC1. (remove property springdoc.enable-native-image-support and introduce new springdoc module)
    • #1348 - Treat java.nio.charset.Charset as string type by default.

    Changed

    • Upgrade swagger-ui to 4.1.2
    • Upgrade to spring-boot 2.6.0
    • #1325 - Add tests for @ParameterObject on spring boot webflux

    Fixed

    • #1320 - Fixed exception handler order
    • #1331 - Endpoint parameters are translated even if they should not
    • #1333 - NPEs when using @ParameterObject with custom Pageable and adding descriptions to fields
    • #1339 - Comments are not picked up for fields in Typed data classes
    • #1351 - @Tag name parameter not consistently performing lookup on properties file
    • #1347 - Break circular references which disabled by default since spring boot 2.6
    Source code(tar.gz)
    Source code(zip)
  • v1.5.12(Oct 20, 2021)

    Changed

    • Upgrade swagger-ui to 3.52.5
    • #1282 - #1288 - #1292 - #1293 Use Optional List to inject RequestMappingInfoHandlerMapping.
    • #1290 - Use Publisher as response wrapper to ignore instead of Mono.
    • #1313 - Upgrading to io.github.classgraph:classgraph to v4.8.116
    • #1296 - Update Demo URLs

    Fixed

    • #1316 - Hidden controller exposes Operation annotated method
    • #1289 - Fix server address customizing in case of enabled pre-loading mode
    • #1274 - Objects properties order is not preserved with springdoc.api-docs.resolve-schema-properties = true.
    • #1287 - Fix typo of PageableConverter Javadoc
    Source code(tar.gz)
    Source code(zip)
  • v1.5.11(Oct 3, 2021)

    Added

    • #1232 - Get CSRF token from local storage
    • #1256 - Added parent pom.xml as BOM
    • #1258 - Add support for HandlerTypePredicate in spring-web.
    • #1265 - adding spring support with the official jetbrains compiler plugin
    • #1268 - Added I18n support.
    • #38 - Derive documentation from javadoc.

    Changed

    • Upgrade swagger-ui to 3.52.3
    • Upgrade swagger-api to 2.1.11
    • Upgrade spring-boot to 2.5.5
    • #1233 - Operation ids for actuator endpoints.

    Fixed

    • #1230 - Feign clients that uses SpringMVCContract appears in OpenApi like controllers exposed if spring-boot-starter-actuator is in classpath.
    • #1215 - Bad Pageable description in Page description.
    • #1215 - Change default behavior of pageable reoslution, outside of spring data rest.
    • #1252 - Schemas for subclasses not rendered in GraalVM native image builds.
    • #1261 - Removal of SpringdocRouterFunctionDsl.
    • #1188 - Cannot override servers in api-docs.yaml using OpenApiCustomiser.
    • #1208 - Response schema for overridden methods of ResponseEntityExceptionHandler is not generated.
    • #1276 - Cannot referenced example in RequestBody.
    • #1277 - Inconsistent casing of swagger-config causes fetch error.
    Source code(tar.gz)
    Source code(zip)
Owner
springdoc-openapi
https://www.linkedin.com/in/nasslahsen/
springdoc-openapi
Spring HATEOAS - Library to support implementing representations for hyper-text driven REST web services.

Spring HATEOAS This project provides some APIs to ease creating REST representations that follow the HATEOAS principle when working with Spring and es

Spring 920 Mar 8, 2021
🪖 A library for counting queries for Spring Data JPA application

?? Query-Counter Query-Counter is a library for counting queries for Spring Data JPA application, currently supporting Hibernate only. It aims to help

Jinhong 3 Dec 12, 2021
Spring GraphQL demo application

Spring Projects GraphQL API This repository is a demo application for introducing the Spring GraphQL project. This is currently based on Spring Boot a

Brian Clozel 4 Aug 24, 2022
A damn simple library for building production-ready RESTful web services.

Dropwizard Dropwizard is a sneaky way of making fast Java web applications. It's a little bit of opinionated glue code which bangs together a set of l

Dropwizard 8.3k Jan 5, 2023
Microserver is a Java 8 native, zero configuration, standards based, battle hardened library to run Java Rest Microservices via a standard Java main class. Supporting pure Microservice or Micro-monolith styles.

Microserver A convenient modular engine for Microservices. Microserver plugins offer seamless integration with Spring (core), Jersey, Guava, Tomcat, G

AOL 936 Dec 19, 2022
Nano-library which provides the ability to define typesafe (!) configuration templates for applications.

Configur8 Nano-library which provides the ability to define typesafe (!) Configuration templates for applications. Concept: A Configuration is a set o

David Denton 11 Oct 3, 2022
IntelliJ plugin for continuous OpenAPI linting using the Spectral OpenAPI linter

Spectral IntelliJ Plugin This plugin is a wrapper for the tool Spectral, a linter for OpenApi schemas. It supports all Jetbrains IDEs starting at vers

Schwarz IT 19 Jun 6, 2022
OpenAPI JSON Schema Generator allows auto-generation of API client libraries with a focus on JSON schema given an OpenAPI Spec

OpenAPI JSON Schema Generator IMPORTANT: before the first release, one will need to build the project locally to use the enhancements, bug fixes in th

OpenAPI Tools 5 Dec 31, 2022
该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的线上博客项目/企业大型商城系统/前后端分离实践项目等,摆脱各种 hello world 入门案例的束缚,真正的掌握 Spring Boot 开发。

Spring Boot Projects 该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的前

十三 4.5k Dec 30, 2022
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
Library for OpenAPI 3 with spring-boot

Full documentation Acknowledgements springdoc-openapi is made possible thanks to all of its contributors. Introduction The springdoc-openapi Java libr

springdoc-openapi 2.3k Jan 5, 2023
Tuya 37 Dec 26, 2022
Community extension to generate a Java client from the provided Camunda 7 OpenAPI descitpion and also warp it into Spring Boot

Camunda Engine OpenAPI REST Client Java and Spring Boot This community extension is a convenience wrapper around the generated Java client from the Ca

Camunda Community Hub 29 Dec 28, 2022
Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login example with Spring Security, MySQL and JWT Appropriate Flow for User Login and Registration with JWT Spring Boot Rest Api Architect

null 58 Jan 5, 2023
A plugin to help you easily edit Swagger and OpenAPI specification files inside IntelliJ IDEA

Swagger Plugin Swagger Plugin makes it easy to edit Swagger and OpenAPI specification files inside IntelliJ IDEA. You can find it on JetBrains' plugin

Zalando SE 1.1k Dec 15, 2022
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.

Astrum A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3. OpenAPI is now a widely-adopted met

Apiwiz 11 May 24, 2022
OpenApi Generator - REST Client Generator

Quarkus - Openapi Generator Welcome to Quarkiverse! Congratulations and thank you for creating a new Quarkus extension project in Quarkiverse! Feel fr

Quarkiverse Hub 46 Jan 3, 2023
A Parser That parses OpenAPI definitions in JSON or YAML format and Generates Pact files That contain HTTP request/response interactions by parsing Given Open API specifications

This is a Parser That parses OpenAPI definitions in JSON or YAML format and Generates Pact files That contain HTTP request/response interactions by parsing Given Open API specifications.

dev-rgupta 2 Mar 19, 2022
This is a Maven plugin designed to help developers automatizing the creation of code classes from YML files based on AsyncApi and OpenAPI.

SCS MultiApi Maven Plugin This is a Maven plugin designed to help developers automatizing the creation of code classes from YML files based on AsyncAp

Corunet 0 Dec 20, 2022
about learning Spring Boot via examples. Spring Boot 教程、技术栈示例代码,快速简单上手教程。

Spring Boot 学习示例 Spring Boot 使用的各种示例,以最简单、最实用为标准,此开源项目中的每个示例都以最小依赖,最简单为标准,帮助初学者快速掌握 Spring Boot 各组件的使用。 Spring Boot 中文索引 | Spring Cloud学习示例代码 | Spring

纯洁的微笑 28.3k Jan 1, 2023