-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[BUG] Array keyword minItems not in serde validator #17136
Comments
@vances thanks for reporting the issue. Would you have time to contribute a PR with a fix? |
@wing328 I don't do Java myself, so I probably can't contribute a PR. |
I could be wrong but looks like the bug can be fixed by simply updating the mustache templates in https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/rust-server and here is how another template (python-flask) is using openapi-generator/modules/openapi-generator/src/main/resources/python-flask/model.mustache Line 156 in 6d93b0e
|
@wing328 Heh, I had just reached that conclusion by fumbling my way around. :) I'll try to make it work. Thanks. |
👍 let me know if you need any help (PM me via Slack) |
Completed in PR #17201 |
Description
Array keyword
minItems
results with empty validation in Rust model.openapi-generator version
7.1.0
OpenAPI declaration file content or url
Generation Details
$ uname -a Darwin box.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103 arm64 $ cargo version cargo 1.71.0 (cfd3bbd8f 2023-06-08)
Steps to reproduce
The generated
src/models.rs
:Related issues/PRs
Suggest a fix
The validation in the generated model should be:
The text was updated successfully, but these errors were encountered: