diff --git a/Cargo.toml b/Cargo.toml index 0ae4f79..13dddba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,8 @@ [workspace] resolver = "2" members = [ - "./speka", - "./speka-examples", - "./speka-macro", + "speka", + "speka-examples", + "speka-macro", + "speka-axum", ] diff --git a/README.md b/README.md index 60697d1..9042649 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# `speka` +# `speka` - OpenAPI generation utilities [![Crates.io](https://img.shields.io/crates/v/speka)](https://crates.io/crates/speka) [![docs.rs](https://img.shields.io/docsrs/speka/latest)](https://docs.rs/speka/latest) diff --git a/publish.sh b/publish.sh index 15dc3d4..dabbe4f 100755 --- a/publish.sh +++ b/publish.sh @@ -9,3 +9,4 @@ publish_crate() { publish_crate speka-macro publish_crate speka +publish_crate speka-axum diff --git a/speka-axum/Cargo.toml b/speka-axum/Cargo.toml new file mode 100644 index 0000000..139ba2d --- /dev/null +++ b/speka-axum/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "speka" +description = "Procedural macro for generating OpenAPI operation specification (using okapi)" +version = "0.3.0-rc3" +authors = ["Andrey Kononov flowneee3@gmail.com"] +edition = "2021" +license = "MIT" +keywords = ["rust", "openapi", "swagger", "axum"] +categories = ["web-programming"] +readme = "../README.md" +repository = "https://github.com/Flowneee/speka" + +[dependencies] +speka = { path = "../speka", version = "0.3.0-rc3", features = ["axum"] } diff --git a/speka-axum/src/lib.rs b/speka-axum/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/speka-axum/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +}