forked from loafle/openapi-generator-original
[Rust-Axum] Update tests to not use templates (#20427)
* Update tests to not use templates * Wrong filename
This commit is contained in:
parent
d30220b8df
commit
29f7c2ea0b
@ -50,7 +50,7 @@
|
||||
- filename: "samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ZebraTest.java"
|
||||
sha256: 15eeb6d8a9a79d0f1930b861540d9c5780d6c49ea4fdb68269ac3e7ec481e142
|
||||
# rust axum test files
|
||||
- filename: "samples/server/petstore/rust-axum/output/rust-axum-oneof/src/tests.rs"
|
||||
sha256: 3d4198174018cc7fd9d4bcffd950609a5bd306cf03b2fa780516f4e22a566e8c
|
||||
- filename: "samples/server/petstore/rust-axum/output/openapi-v3/src/tests.rs"
|
||||
sha256: 356ac684b1fce91b153c63caefc1fe7472ea600ac436a19631e16bc00e986c50
|
||||
- filename: "samples/server/petstore/rust-axum/output/rust-axum-oneof/tests/oneof_with_discriminator.rs"
|
||||
sha256: 2d4f5a069fdcb3057bb078d5e75b3de63cd477b97725e457079df24bd2c30600
|
||||
- filename: "samples/server/petstore/rust-axum/output/openapi-v3/tests/oneof_untagged.rs"
|
||||
sha256: e72fbf81a9849dc7abb7e2169f2fc355c8b1cf991c0e2ffc083126abd9e966e7
|
||||
|
@ -236,8 +236,6 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
|
||||
supportingFiles.add(new SupportingFile("header.mustache", "src", "header.rs"));
|
||||
supportingFiles.add(new SupportingFile("server-mod.mustache", "src/server", "mod.rs"));
|
||||
supportingFiles.add(new SupportingFile("apis-mod.mustache", apiPackage().replace('.', File.separatorChar), "mod.rs"));
|
||||
// The file gets overwritten regardless
|
||||
supportingFiles.add(new SupportingFile("tests.mustache", "src", "tests.rs").doNotOverwrite());
|
||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md").doNotOverwrite());
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,3 @@ pub mod apis;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,9 +0,0 @@
|
||||
#[test]
|
||||
fn std_test() {
|
||||
assert!(true);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
@ -7,5 +7,4 @@ src/header.rs
|
||||
src/lib.rs
|
||||
src/models.rs
|
||||
src/server/mod.rs
|
||||
src/tests.rs
|
||||
src/types.rs
|
||||
|
@ -26,6 +26,3 @@ pub mod types;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,9 +0,0 @@
|
||||
#[test]
|
||||
fn std_test() {
|
||||
assert!(true);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
@ -7,5 +7,4 @@ src/header.rs
|
||||
src/lib.rs
|
||||
src/models.rs
|
||||
src/server/mod.rs
|
||||
src/tests.rs
|
||||
src/types.rs
|
||||
|
@ -26,6 +26,3 @@ pub mod types;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,9 +0,0 @@
|
||||
#[test]
|
||||
fn std_test() {
|
||||
assert!(true);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
@ -9,5 +9,4 @@ src/header.rs
|
||||
src/lib.rs
|
||||
src/models.rs
|
||||
src/server/mod.rs
|
||||
src/tests.rs
|
||||
src/types.rs
|
||||
|
@ -26,6 +26,3 @@ pub mod types;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use openapi_v3::models::OneOfGet200Response;
|
||||
|
||||
#[test]
|
||||
fn test_oneof_schema_untagged() {
|
||||
use crate::models::OneOfGet200Response;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
struct Test {
|
||||
value: OneOfGet200Response,
|
||||
@ -34,8 +34,3 @@ fn test_oneof_schema_untagged() {
|
||||
test6
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
@ -7,5 +7,4 @@ src/header.rs
|
||||
src/lib.rs
|
||||
src/models.rs
|
||||
src/server/mod.rs
|
||||
src/tests.rs
|
||||
src/types.rs
|
||||
|
@ -26,6 +26,3 @@ pub mod types;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,9 +0,0 @@
|
||||
#[test]
|
||||
fn std_test() {
|
||||
assert!(true);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
@ -12,5 +12,4 @@ src/header.rs
|
||||
src/lib.rs
|
||||
src/models.rs
|
||||
src/server/mod.rs
|
||||
src/tests.rs
|
||||
src/types.rs
|
||||
|
@ -26,6 +26,3 @@ pub mod types;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,9 +0,0 @@
|
||||
#[test]
|
||||
fn std_test() {
|
||||
assert!(true);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
@ -9,5 +9,4 @@ src/header.rs
|
||||
src/lib.rs
|
||||
src/models.rs
|
||||
src/server/mod.rs
|
||||
src/tests.rs
|
||||
src/types.rs
|
||||
|
@ -26,6 +26,3 @@ pub mod types;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,9 +0,0 @@
|
||||
#[test]
|
||||
fn std_test() {
|
||||
assert!(true);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
@ -7,5 +7,4 @@ src/header.rs
|
||||
src/lib.rs
|
||||
src/models.rs
|
||||
src/server/mod.rs
|
||||
src/tests.rs
|
||||
src/types.rs
|
||||
|
@ -26,6 +26,3 @@ pub mod types;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,9 +0,0 @@
|
||||
#[test]
|
||||
fn std_test() {
|
||||
assert!(true);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
@ -7,5 +7,4 @@ src/header.rs
|
||||
src/lib.rs
|
||||
src/models.rs
|
||||
src/server/mod.rs
|
||||
src/tests.rs
|
||||
src/types.rs
|
||||
|
@ -26,6 +26,3 @@ pub mod types;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,9 +0,0 @@
|
||||
#[test]
|
||||
fn std_test() {
|
||||
assert!(true);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
@ -7,5 +7,4 @@ src/header.rs
|
||||
src/lib.rs
|
||||
src/models.rs
|
||||
src/server/mod.rs
|
||||
src/tests.rs
|
||||
src/types.rs
|
||||
|
@ -26,6 +26,3 @@ pub mod types;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use rust_axum_oneof::models::*;
|
||||
|
||||
#[test]
|
||||
fn test_oneof_schema_with_discriminator() {
|
||||
use crate::models::*;
|
||||
|
||||
let test0 = r#"{"op": "ignored", "d": {"welcome_message": "test0"}}"#;
|
||||
|
||||
let test1 = r#"{"op": "Hello", "d": {"welcome_message": "test1"}}"#;
|
||||
@ -94,8 +94,3 @@ fn test_oneof_schema_with_discriminator() {
|
||||
test15
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
@ -7,5 +7,4 @@ src/header.rs
|
||||
src/lib.rs
|
||||
src/models.rs
|
||||
src/server/mod.rs
|
||||
src/tests.rs
|
||||
src/types.rs
|
||||
|
@ -26,6 +26,3 @@ pub mod types;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,9 +0,0 @@
|
||||
#[test]
|
||||
fn std_test() {
|
||||
assert!(true);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
@ -7,5 +7,4 @@ src/header.rs
|
||||
src/lib.rs
|
||||
src/models.rs
|
||||
src/server/mod.rs
|
||||
src/tests.rs
|
||||
src/types.rs
|
||||
|
@ -26,6 +26,3 @@ pub mod types;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod header;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -1,9 +0,0 @@
|
||||
#[test]
|
||||
fn std_test() {
|
||||
assert!(true);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tokio_test() {
|
||||
assert!(true);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user