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

Ctrlaltf24 basic rust anyof support #17854

Closed
wants to merge 6 commits into from

Commits on Feb 7, 2024

  1. [rust] basic oneOf support

    Suport oneOf as a rust struct enum.
    
    Details:
    
    Enum without a discriminator is untagged being
    "untagged" simply means serde won't attempt to
    store the name of the enum inside the serialized
    object. See
    https://serde.rs/enum-representations.html#untagged
    for more
    
    Also check to make sure the mapping values
    are not an empty object (aka null).
    
    Co-authored-by: Nikita Puzankov <[email protected]>
    ctrlaltf24 and humb1t committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    f65ed95 View commit details
    Browse the repository at this point in the history
  2. refactor: fix clippy lints

    No longer needed as of reqwest 0.10, it now takes the response as owned instead of mut ref.
    
    Is not empty is more clear
    ctrlaltf24 committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    93bab0c View commit details
    Browse the repository at this point in the history
  3. fix: discriminator and oneof case

    Will show as a struct enum when there are additional fields, otherwise will be a tuple enum.
    
    not sure the purpose of x-mapped-models, perhaps legacy code? mappedModels appears to do the same thing.
    
    Also add default implementation for quality of life
    ctrlaltf24 committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    6437fc7 View commit details
    Browse the repository at this point in the history
  4. chore: update samples

    ctrlaltf24 committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    2d981dd View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. Merge branch 'basic-rust-anyof-support' of https://github.com/ctrlalt…

    …f24/openapi-generator into ctrlaltf24-basic-rust-anyof-support
    wing328 committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    524c74d View commit details
    Browse the repository at this point in the history
  2. trigger build failure

    wing328 committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    099b246 View commit details
    Browse the repository at this point in the history