Skip to content
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

Version 2.2.9 defaults minLength to 1 against the actual Schema #4859

Open
SandorArpa opened this issue Mar 11, 2025 · 0 comments
Open

Version 2.2.9 defaults minLength to 1 against the actual Schema #4859

SandorArpa opened this issue Mar 11, 2025 · 0 comments

Comments

@SandorArpa
Copy link

SandorArpa commented Mar 11, 2025

Using swagger-annotations and swagger-maven-plugin, version 2.2.9.
Upgrading to 2.2.9, the following happens:
@Schema(example = "4242424242424242", minLength = 12, maxLength = 19, required = true)
is generated as:
type: string example: "4242424242424242" maxLength: 19 minLength: 1

@Schema(example = "123", minLength = 3, maxLength = 4, required = true)
is generated as
type: string example: "123" maxLength: 4 minLength: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant