Expand description
§use-openapi
OpenAPI document primitives for RustUse.
Provides lightweight typed labels for paths, operations, parameters, responses, schemas, tags, and components without parsing or generating full OpenAPI documents.
§Example
use use_openapi::{OpenApiOperationKind, OpenApiPath};
let value = OpenApiPath::new("listUsers").expect("valid API primitive");
assert_eq!(value.as_str(), "listUsers");
assert_eq!(OpenApiOperationKind::Get.to_string(), "get");§Scope
- Small validated types for API metadata.
- Stable display labels and conservative parsing helpers.
- Dependency-light primitives that can be reused by other RustUse crates.
§Non-goals
- No full
OpenAPIparser. - No document generation.
- No schema validation engine.
§License
Licensed under either of the following, at your option:
- Apache License, Version 2.0
- MIT license
Structs§
- Component
Name - Open
ApiPath - Operation
Id - Parameter
Name - Primitive
Metadata - Lightweight metadata tying this crate’s primary text and label together.
- Request
Body Name - Response
Name - Schema
Name - TagName
Enums§
- ApiPrimitive
Error - Error returned when API primitive text or labels are invalid.
- Open
ApiOperation Kind OpenAPIoperation kind labels.- Open
ApiParameter Location OpenAPIparameter location labels.