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

Array Size Validation #14

Open
vances opened this issue Nov 27, 2023 · 4 comments
Open

Array Size Validation #14

vances opened this issue Nov 27, 2023 · 4 comments

Comments

@vances
Copy link
Contributor

vances commented Nov 27, 2023

oda-api-sdk-rust version

0.1.0

OS version

Any

Steps to reproduce

Run openapi-generator-cli with the rust or rust-server generator.

Current behavior

Results in tmf*/src/models.rs containing an empty serde attribute [#validate()] which prevents cargo build from succeeding.

Expected behavior

The Rust generators should map minItems:1 and maxItems:10 in the OAS to [#validate(length(min=1,max=10)].

This is BUG17136 in the OpenAPITools/openapi-generator project.

@vances
Copy link
Contributor Author

vances commented Nov 27, 2023

Fixed in a fork of 7.2.0-SNAPSHOT and submitted pull request 17201.

@vances
Copy link
Contributor Author

vances commented Nov 28, 2023

The pull request was added to the 7.2.0 milestone and so should be included in that release.

@vances
Copy link
Contributor Author

vances commented Nov 29, 2023

This was tested manually by @wing328 (William Cheng) and pushed to the master branch.

Closed #17136 as completed via #17201.

@vances vances closed this as completed Nov 29, 2023
@vkatsuba vkatsuba reopened this Nov 29, 2023
@vkatsuba
Copy link
Collaborator

I reopen this issue by reason that - those fix is not released. We need double check release 7.2 when it will out and then provide info about it in README and then close this ticket.

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

2 participants