-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Rust-Axum][Breaking Change] Improve the
oneOf
model generator (#20336
) * Improve the implementation of oneOf * Fixed 2.0 schemas; possible freeze present * Fix generate-samples.sh freezing * Fix validation of primitive types * Move oneOf handling to its own method * Fix formatting and add comments * Remove allOf based discriminator handling * Implement a test for v3 oneOf * Implement oneOf tests for rust axum * Fix circle CI * Fix pom path, ensure cargo is present * Implement untagged test * Add final and fix double underscore typo
- Loading branch information
1 parent
eb96380
commit 3d65786
Showing
54 changed files
with
2,909 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
generatorName: rust-axum | ||
outputDir: samples/server/petstore/rust-axum/output/rust-axum-oneof | ||
inputSpec: modules/openapi-generator/src/test/resources/3_0/rust-axum/rust-axum-oneof.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/rust-axum | ||
generateAliasAsModel: true | ||
additionalProperties: | ||
hideGenerationTimestamp: "true" | ||
packageName: rust-axum-oneof | ||
globalProperties: | ||
skipFormModel: "false" | ||
enablePostProcessFile: true |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,6 @@ pub mod apis; | |
|
||
#[cfg(feature = "server")] | ||
pub(crate) mod header; | ||
|
||
#[cfg(test)] | ||
mod tests; |
This file contains 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
9 changes: 9 additions & 0 deletions
9
modules/openapi-generator/src/main/resources/rust-axum/tests.mustache
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#[test] | ||
fn std_test() { | ||
assert!(true); | ||
} | ||
|
||
#[tokio::test] | ||
async fn tokio_test() { | ||
assert!(true); | ||
} |
Oops, something went wrong.