-
-
Notifications
You must be signed in to change notification settings - Fork 523
Path variable mapped improperly in swagger-ui #2028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm seeing the same issue, for both |
This actually looks like an issue with Spring Framework itself. I'm seeing |
It seems that the
I set plugins {
id 'org.springframework.boot' version '3.0.0'
id 'io.spring.dependency-management' version '1.1.0'
id 'java'
}
...
tasks.withType(JavaCompile) {
options.compilerArgs.add("-parameters")
} Instead, the easy way to solve this problem is to clearly define the value (or name) of the @Operation(summary = "Get company details", description = "Get company details")
fun getCompanyDetails(@PathVariable(value = "companyId") companyId: Long): ResponseEntity<CompanyDTO> {
val company = companyService.getCompanyByIdOrException(companyId)
return ResponseEntity.ok(company.toDto())
} In my application, there was the same issue when There seems to be a problem that the current library cannot read this value. |
I guess this is the same issue as #2036 |
You might need to use |
Can you 🙏 release a new version with this fix? Can you specify details of You might need to use -parameters? This worked correctly until now with no -parameters field. |
@knyttl, The release would be at the latest, by the end of this month. You can already do your tests with the latest SNAPSHOT. And in the new Default implementation is now: |
Hi, would you be able to release earlier? The sonatype snapshot repo is down today (returns 504) and we cannot build at all :/ |
@bnasslahsen Is this correct behavior? |
Describe the bug
I have simple controller in Kotlin
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
And when trying it out i get 404:
as you can see rather than using given value %7BcompanyId%7D string is being used
The text was updated successfully, but these errors were encountered: