-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
@NotEmpty is being ignored in 2.8.6 and does not create required attribute #2946
Comments
This looks to be a regression in As a workaround, you can downgrade the swagger-core version to <dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.8.6</version>
<exclusions>
<exclusion>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-core-jakarta</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-core-jakarta</artifactId>
<version>2.2.28</version>
</dependency> |
Hey @bnasslahsen, Thanks for the info! I also found the workaround to add |
And for Gradle aficionados:
|
I also encountered the same issue in a Gradle environment. |
Describe the bug
After updating to version 2.8.6 of [Framework/Library Name], the
@NotEmpty
annotation on request DTOs no longer generates the required attribute in the OpenAPI file. This behavior worked as expected in the previous version 2.8.5.To Reproduce
Steps to reproduce the behavior:
@NotEmpty
3.4.4
springdoc-openapi-starter-webmvc-ui @ 2.8.6
Expected behavior
Sample code should add a
The text was updated successfully, but these errors were encountered: