oasgen 0.8.3

Generates OpenAPI 3.0 spec based on Rust code. Works with axum, actix-web, or independent of a web framework.
Documentation
use http::Method;
use oasgen_core::{OaOperation, OaSchema};
use crate::Server;


impl Server<()> {
    pub fn none() -> Self {
        Self::new()
    }

    pub fn get<F, Signature>(mut self, path: &str, handler: F) -> Self
        where
            F: OaOperation<Signature>,
    {
        self.add_handler_to_spec(path, Method::GET, &handler);
        self
    }

    pub fn post<F, Signature>(mut self, path: &str, handler: F) -> Self
        where
            F: OaOperation<Signature>
    {
        self.add_handler_to_spec(path, Method::POST, &handler);
        self
    }
}