Trait axum_restful::swagger::SwaggerGeneratorExt
source · pub trait SwaggerGeneratorExt<T>: 'static + ModelViewExt<T>where
Self: Send + JsonSchema,
T: ActiveModelTrait + ActiveModelBehavior + Send + 'static + Sync,
for<'de> <T::Entity as EntityTrait>::Model: IntoActiveModel<T> + Serialize + Sync + JsonSchema + Deserialize<'de>,{
Show 19 methods
// Provided methods
fn modle_schema_description() -> String { ... }
fn serve_dir_path() -> &'static str { ... }
fn redoc_openapi_json_url() -> &'static str { ... }
fn serve_docs<'async_trait>(
__arg0: Extension<Arc<OpenApi>>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>> { ... }
fn api_docs_head_config(api: TransformOpenApi<'_>) -> TransformOpenApi<'_> { ... }
fn http_retrieve_summary() -> String { ... }
fn http_retrieve_docs(op: TransformOperation<'_>) -> TransformOperation<'_> { ... }
fn http_update_summary() -> String { ... }
fn http_update_docs(op: TransformOperation<'_>) -> TransformOperation<'_> { ... }
fn http_delete_summary() -> String { ... }
fn http_delete_docs(op: TransformOperation<'_>) -> TransformOperation<'_> { ... }
fn http_delete_all_summary() -> String { ... }
fn http_delete_all_docs(
op: TransformOperation<'_>
) -> TransformOperation<'_> { ... }
fn http_list_summary() -> String { ... }
fn http_list_docs(op: TransformOperation<'_>) -> TransformOperation<'_> { ... }
fn http_create_summary() -> String { ... }
fn http_create_docs(op: TransformOperation<'_>) -> TransformOperation<'_> { ... }
fn model_api_router() -> ApiRouter { ... }
fn http_router_with_swagger<'async_trait>(
nest_prefix: &'static str,
model_api_router: ApiRouter
) -> Pin<Box<dyn Future<Output = Result<Router>> + Send + 'async_trait>>
where Self: Send + 'static + Send + 'async_trait { ... }
}Expand description
generate swagger docs for service when the service is up you can visit below
// swagger doc
http://{ipaddress}:{port}/docs/swagger/
// openapi doc
http://{ipaddress}:{port}/docs/openapi
Provided Methods§
fn modle_schema_description() -> String
fn serve_dir_path() -> &'static str
fn redoc_openapi_json_url() -> &'static str
fn serve_docs<'async_trait>( __arg0: Extension<Arc<OpenApi>> ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
fn api_docs_head_config(api: TransformOpenApi<'_>) -> TransformOpenApi<'_>
fn http_retrieve_summary() -> String
fn http_retrieve_docs(op: TransformOperation<'_>) -> TransformOperation<'_>
fn http_update_summary() -> String
fn http_update_docs(op: TransformOperation<'_>) -> TransformOperation<'_>
fn http_delete_summary() -> String
fn http_delete_docs(op: TransformOperation<'_>) -> TransformOperation<'_>
fn http_delete_all_summary() -> String
fn http_delete_all_docs(op: TransformOperation<'_>) -> TransformOperation<'_>
fn http_list_summary() -> String
fn http_list_docs(op: TransformOperation<'_>) -> TransformOperation<'_>
fn http_create_summary() -> String
fn http_create_docs(op: TransformOperation<'_>) -> TransformOperation<'_>
fn model_api_router() -> ApiRouter
fn http_router_with_swagger<'async_trait>( nest_prefix: &'static str, model_api_router: ApiRouter ) -> Pin<Box<dyn Future<Output = Result<Router>> + Send + 'async_trait>>
Object Safety§
This trait is not object safe.