Rust: Add support for lists (and sets) of enum values#8693
Merged
wing328 merged 2 commits intoOpenAPITools:masterfrom Feb 23, 2021
Merged
Rust: Add support for lists (and sets) of enum values#8693wing328 merged 2 commits intoOpenAPITools:masterfrom
wing328 merged 2 commits intoOpenAPITools:masterfrom
Conversation
Member
@gferon thanks for the PR. Are we on the same page that this is a set instead of array? I've not checked if we have correctly mapped this to a proper set type in Rust in the generator. |
Contributor
Author
|
@wing328 great catch! you're absolutely right, I've added a test for |
wing328
approved these changes
Feb 23, 2021
Member
wing328
left a comment
There was a problem hiding this comment.
Tested locally and the result is good.
Member
|
@gferon thanks for the PR, which has been included in the v5.1.0 release: https://twitter.com/oas_generator/status/1373636654024380423 |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For a field described like:
the generated field in Rust would not be correct and was:
with this patch, it is now correctly wrapped in a collection, depending on whether
uniqueItemsis set or not:For a list:
For a set:
cc @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) for review