forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Basic rust anyof support #1
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
Merged
ctrlaltf24
merged 2,216 commits into
ctrlaltf24:master
from
humb1t:basic-rust-anyof-support
Dec 14, 2023
Merged
Basic rust anyof support #1
ctrlaltf24
merged 2,216 commits into
ctrlaltf24:master
from
humb1t:basic-rust-anyof-support
Dec 14, 2023
Conversation
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
…ADME template (OpenAPITools#16812) * Replace references to sw package with {{packageName}} * Update samples
…APITools#16834) * generate samples * try fix * add new sample for fixed case * also improve native library Other libraries don't need fixes. * add oneOf_twoPrimitives.yaml * generate samples * resolve comment
…PITools#16835) * [PHP-Symfony] fix OpenAPITools#15950: Add float to deserialize * Add test sample * Add double --------- Co-authored-by: DaxServer <[email protected]>
…penAPITools#16761) * Autoset constants (Required fields having single valid enum value) Python Implementation of OpenAPITools#16547 * Fixing ``PythonClientCodegenTest.testHandleConstantParams`` for Windows platform.
…enAPITools#16816) * Add support for all +json and +xml suffixed media types to generated Go client * Export JsonCheck and XmlCheck and add external tests * Remove client_test.mustache
…6781) * Add support for Enums to be part of the Path and Query Supports optional Query Enums and Lists of Enums as well Add an example endpoint that covers the added scenarios Added an import mapping for the GoServerCodegen for "fmt" when a model is an enum. Expanded the Enum Model for the Go Server to have validation. Copied this logic from the Go Client Enum Model. * Fix identation of examples * Pre-allocate the capacity of the slice of Enums to be the correct size. * Formatting and updated examples * Empty-Commit * Switch to using a map to store the valid enum values * Fixed pointer derefs missed from previous change in PR * More fixing of pointer to not pointer * Create a map for validation and a list of enums for messaging
…penAPITools#15206 (OpenAPITools#16748) * Support for an endpoint returning a file to a client. * Spaces to tabs conversion * Add an example endpoint for download a file * Regenerate after merging main
* OpenAPITools#16832: Upgrade Guava version to 32.0.1 * OpenAPITools#16832: Upgrade Guava version to 32.1.3
…nAPITools#16839) Co-authored-by: Ben Madore <[email protected]>
* fixed childMapping method * updated samples * fixed deps
…6671) * fix(nestjs) fix import in api module template (16670) * fix(nestjs) fix import in api module template (16670) --------- Co-authored-by: Thomas Trapanese <[email protected]>
Bumps [jurplel/install-qt-action](https://github.com/jurplel/install-qt-action) from 3 to 4. - [Release notes](https://github.com/jurplel/install-qt-action/releases) - [Commits](jurplel/install-qt-action@v3...v4) --- updated-dependencies: - dependency-name: jurplel/install-qt-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…6749) * Add support for DateTime objects in the Path, Query Params, and as a List * Fix indentation * Add an exaple that has dateTimes Move the date parsing into a common util in the routers.go file. * Fix compilation issue and regen * Use the `RequiredError` to handle this case * Only split on a "," and not an extra 'space' after the ",".
* [Ruby] Add support for gems metadata This defaults to an empty hash, but can be overridden with any custom object by the callers via the `gemMetadata` property. * Regenerate samples The gemspecs files will now include a metadata field
Right now, if a developer uses `direnv` but does not use `nix`, an error is reported whenever changing into the OpenAPI generator directory: ```console $ cd ~/oss/forks/openapi-generator direnv: loading ~/oss/forks/openapi-generator/.envrc direnv: using flake environment:1270: nix: command not found ``` This uses the `has()` function to check for `nix` to *conditionally* run the `use_flake` function.
…penAPITools#16900) * [ruby|client] Fix unmarshalling errors of enums inside other objects Ruby|Client autogenerated model classes for Enums do not expose openapi_one_of method. Instead they expose openapi_any_of method like: # List of class defined in anyOf (OpenAPI v3) def openapi_any_of [ :String ] end Both types (objects and enums) do respond to build() method. * Regenerate samples
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The generated example code would clone the context. However as context is a generic type and is not declared to implement Clone, a clone of a reference is just a copy of the reference and therefore unnecessary. This change removes the redundant call and therefore avoids the `cargo clippy` warning.
…penAPITools#16927) * chore(deps,rust): requires reqwest to be 0.11 series even if generate in blocking mode * chore: reflect change * test: reflect blocking Form
…methods; resolves OpenAPITools#14608 (OpenAPITools#16886) * Update ApiClient.mustache added missing line in config mapping * update samples --------- Co-authored-by: William Cheng <[email protected]>
* fix NPE in the example generator * fix any type in 3.1 spec * use log error instead
…enAPITools#17165) * [4947][java]: adds support for validation of primitives in arrays * [4947][java]: prevents generation '@Valid' for Object * [4947][java]: test against different codegens and stick to primitive * [4947][java]: code review * [4947][java]: enhance getBeanValidation * [4947][java]: adds email * [4947][java]: removes unnecessary override * [4947][java]: adds postProcessResponseWithProperty * [4947][java]: adds missing import {{javaxPackage}}.validation.Valid * [4947][java]: adds missing useBeanValidation * [4947][java]: fix use rootJavaEEPackage for helidon
* Implementing retry logic to restTemplate * Fixing the issue * Adding import * Fix * Fix * minor update, add tests * fix * Adding the maxRetryAttempt, threadWaitTime as additionalProperty * Updating the apiClient * Removing reduntant variable * Generating samples * Fixing format --------- Co-authored-by: Rubini <[email protected]> Co-authored-by: William Cheng <[email protected]>
* fix npe in codegen security * add new test file
* Fix with handling error * Fix with handling error
* fix(java): fix URI inner enum for gson * fix(java): fix URI enum for gson * fix(java): fix URI enum for microprofile * fix(java): fix URI import for native enum * fix(java): add tests for URI enum
…y string parameters (OpenAPITools#17386) * Add check for input if is Map type * Update Pet samples * Add PetApi support for filter by Pet property * Clean up * update samples * remove manual test --------- Co-authored-by: ameenhaq <[email protected]>
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
Implementing Default is a nice QoL, and is required in some configurations Also check to make sure the mapping values are not an empty object (aka null).
Author
5 tasks
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.


PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.For Windows users, please run the script in Git BASH.
master(6.0.1) (patch release),6.1.x(breaking changes with fallbacks),7.0.x(breaking changes without fallbacks)