#open-api #documentation #axum #summary #comments #description #operation

macro aidecomment

A Rust crate that can get the OpenAPI operation summary and description from doc comments and provide them to aide

2 releases

0.1.1 Feb 16, 2024
0.1.0 Feb 15, 2024

#408 in Procedural macros

MIT license

7KB
60 lines

Aide Comment

This crate provides a macro that can be used to extract a summary and description for an OpenAPI operation from doc comments. This crate supports axum and integrates this information with aide.

/// This is a summary
///
/// This is a longer description of the endpoint that is expected to be much
/// more detailed and may span more lines than the first paragraph summary.
#[aidecomment]
async fn my_handler() -> &'static str {
    "hello world"
}

lib.rs:

This crate provides a macro that can be used to extract a summary and description for an OpenAPI operation from doc comments. This crate supports axum and integrates this information with aide.

Dependencies

~310–760KB
~18K SLoC