oasgen-core 0.1.9

Dependency of oasgen. Generates OpenAPI 3.0 spec based on Rust code. Works with actix-web, but architected to easily extend to other frameworks (or no framework).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod operation;
mod schema;

pub use operation::*;
pub use schema::*;

#[cfg(test)]
#[allow(non_snake_case)]
mod tests {
    use openapiv3::SchemaKind;
    use super::*;

    #[test]
    fn test_String_schema() {
        let s = String::schema().unwrap();
        let SchemaKind::Type(openapiv3::Type::String(_)) = s.schema_kind else { panic!() };
    }
}