Closed SR-Lut3t1um closed 4 years ago
@SR-Lut3t1um,
Please use always the last stable release (v1.3.9) before reporting any bug (this is a duplicate). As described on the Contribution guide, section:
https://github.com/springdoc/springdoc-openapi/blob/master/CONTRIBUTING.adoc
You can have a look at the CHANGELOG, for more details:
@bnasslahsen I did use the newest version (1.3.9) and I run into this issue with the newest version.
@SR-Lut3t1um,
You have mentionned on your description: v1.3.4... If you are reporting a bug, please help to speed up problem diagnosis by providing as much information as possible:
Yes I said my codebase works on 1.3.4 without any problems.
Springboot: 2.2.6.
'org.springdoc:springdoc-openapi-ui:1.3.9'
'org.springdoc:springdoc-openapi-data-rest:1.3.9'
'org.springdoc:springdoc-openapi-security:1.3.9'
'org.springdoc:springdoc-openapi-kotlin:1.3.9'
This is not enough to address your request. Please follow the instructions to create issues, in order to help us speed up problem diagnosis
Its not something reproducible and related to your context... You need to add a Minimal, Reproducible Example
I'll once I have time to create a reproducer, I'm sadly unable to do this right now.
Unfortunetly, we can not fix somthing non reproducible...
I am currently having this same issue on
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.4.4</version>
</dependency>
with
<spring.boot.version>2.2.1.RELEASE</spring.boot.version>
<java-version>1.8</java-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
@dylankolson,
You have mentionned for @SR-Lut3t1um, , If you are reporting a bug, please help to speed up problem diagnosis by providing as much information as possible:
You need to add a Minimal, Reproducible Example:
Attached is the full stack trace when trying to access the API Docs. What is strange is this doesn't happen with 1.2.28 and actually I just tested all the way up to v1.3.7 works, v1.3.8 is when it stops working. Below is how I am using spring doc in the pom. I'll see if I can get a sample project to break.
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.2.28</version>
</dependency>
@dylankolson,
Please validate using the last stable version : v1.4.4 before you report any issue.
@dylankolson,
Please validate using the last stable version : v1.4.4 before you report any issue.
I have it does not work on anything >1.3.7 including v1.4.4
Then @dylankolson, add minimal reproductible sample using v1.4.4 which confirms its not your project configuration issue.
I need to have the following in my pom.xml as well.
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webmvc-core</artifactId>
<version>1.4.4</version>
</dependency>
@dylankolson @bnasslahsen I have got the same after upgrading from 1.2.x to 1.4.4 and it's because Open API is thinking
@GetMapping(value = {"/{id}"}, produces = MediaType.APPLICATION_JSON_VALUE, headers = "Accept=application/json")
and
@GetMapping(value = {"/{id}"}, produces = APPLICATION_PDF_VALUE, headers = "Accept=application/pdf")
are duplicates.
Easy way to fix is to change the get mapping to so OpenAPI thinks this is unique.
@GetMapping(value = {"/{id2}"}, produces = APPLICATION_PDF_VALUE, headers = "Accept=application/pdf")
@davidmelia Thanks, that would make sense in our project as well. Since it worked previously i think this is a bug in newer versions. However I was able to fix by adding springdoc-openapi-webmvc-core
to my pom.xml which then leads me to say I misconfigured via the pom and you need more than just this project in your pom.
Thanks again for the additional information should I run into this again!
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: