#[cfg(feature = "macros")]
pub use service_kit_macros::{api, api_dto};
pub use inventory;
pub use utoipa;
pub use serde_urlencoded;
pub use schemars;
pub mod error;
pub mod handler;
#[cfg(all(not(target_arch = "wasm32"), feature = "mcp"))]
pub mod openapi_to_mcp;
#[cfg(not(target_arch = "wasm32"))]
pub mod rest_router_builder;
#[cfg(all(not(target_arch = "wasm32"), feature = "api-cli"))]
pub mod client;
#[cfg(feature = "cli-core")]
pub mod cli;
#[cfg(feature = "cli-core")]
pub mod wasm_completer;
pub mod openapi_utils;
pub mod bootstrap;
#[derive(Debug, Clone, Copy)]
pub enum ParamIn {
Query,
Path,
}
#[derive(Debug)]
pub struct ApiParameter {
pub name: &'static str,
pub param_in: ParamIn,
pub description: &'static str,
pub required: bool,
pub type_name: &'static str,
}
#[derive(Debug)]
pub struct ApiRequestBody {
pub description: &'static str,
pub required: bool,
pub type_name: &'static str,
}
#[derive(Debug)]
pub struct ApiResponse {
pub status_code: u16,
pub description: &'static str,
pub type_name: Option<&'static str>,
}
#[derive(Debug)]
pub enum ApiOutputShape {
Detail { type_name: &'static str },
List { type_name: &'static str },
}
#[derive(Debug)]
pub struct ApiMetadata {
pub operation_id: &'static str,
pub method: &'static str,
pub path: &'static str,
pub summary: &'static str,
pub description: &'static str,
pub parameters: &'static [ApiParameter],
pub request_body: Option<&'static ApiRequestBody>,
pub responses: &'static [ApiResponse],
pub output: Option<ApiOutputShape>,
}
inventory::collect!(ApiMetadata);
pub struct ApiDtoMetadata {
pub name: &'static str,
pub schema_provider: fn() -> (String, utoipa::openapi::RefOr<utoipa::openapi::Schema>),
}
inventory::collect!(ApiDtoMetadata);