clawspec-macro 0.1.0

Procedural macros for clawspec OpenAPI generation
Documentation
  • Coverage
  • 100%
    1 out of 1 items documented0 out of 0 items with examples
  • Size
  • Source code size: 2.19 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 237.26 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • ilaborie/clawspec
    6 0 2
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ilaborie

Procedural macros for clawspec API generation.

This crate provides procedural macros to make it easier to generate OpenAPI specifications from annotated Rust code.

Future Plans

This crate is intended to provide derive macros for generating API client implementations from annotated traits, similar to how other HTTP client libraries work.

Example future usage:

use clawspec_macro::ApiClient;

#[derive(ApiClient)]
#[api(base_url = "https://api.example.com")]
trait ExampleApi {
    #[get("/users/{id}")]
    async fn get_user(&self, id: u32) -> Result<User, Error>;
}