Expand description
§SZ-ORM Swagger — OpenAPI/Swagger specification generation
Provides building and serialization of OpenAPI 3.0 specifications, supporting paths, methods, parameters, responses, Schema definitions, SecurityScheme, Tags, Servers, and example generation; the output can be consumed directly by tools such as Swagger UI.
§Main types
OpenAPISpec— specification root objectPathInfo— single (path, method) operation descriptionSchema/ [SchemaRef] /ObjectType/ArrayType— Schema definitionsSecurityScheme— authentication schemes (Basic/Bearer/ApiKey/OAuth2)Tag— interface grouping tagServer— environment server configurationExampleBuilder— generates examples based on Schema
Structs§
- Array
Type - Array type Schema
- Authorization
Code Flow - Authorization Code flow
- Client
Credentials Flow - Client Credentials flow
- Components
- Components table, holds reusable Schema and SecurityScheme
- Example
- Example (OpenAPI 3.0 example object)
- Example
Builder - Generator that produces example values based on a Schema
- External
Docs - External documentation link
- Implicit
Flow - Implicit flow
- Media
Type - Media type (contains Schema and examples)
- OAuth2
Flows - OAuth2 flow collection
- Object
Type - Object type Schema
- OpenAPI
Generator - OpenAPI
Spec - OpenAPI 3.0 specification root object
- Password
Flow - Password flow
- Path
Info - Describes a single (path, method) operation in an OpenAPI spec.
- Primitive
Schema - Primitive type Schema (string/integer/number/boolean)
- Request
Body - Request body definition
- Security
Requirement - Security requirement: key-value mapping of required authentication schemes
- Server
- Environment server configuration
- Server
Variable - Server variable (used for URL template substitution)
- Swagger
Ui - Tag
- Interface grouping tag
Enums§
- ApiKey
Location - API Key location
- Schema
- Schema definition, supports reference, object, array, and primitive types
- Security
Scheme - Authentication scheme, supports HTTP (Basic/Bearer), ApiKey, OAuth2
Functions§
- model_
to_ openapi_ schema - Converts a sz-orm
Modeldefinition into an OpenAPI 3.0 object Schema.