Skip to main content

Crate sz_orm_swagger

Crate sz_orm_swagger 

Source
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

Structs§

ArrayType
Array type Schema
AuthorizationCodeFlow
Authorization Code flow
ClientCredentialsFlow
Client Credentials flow
Components
Components table, holds reusable Schema and SecurityScheme
Example
Example (OpenAPI 3.0 example object)
ExampleBuilder
Generator that produces example values based on a Schema
ExternalDocs
External documentation link
ImplicitFlow
Implicit flow
MediaType
Media type (contains Schema and examples)
OAuth2Flows
OAuth2 flow collection
ObjectType
Object type Schema
OpenAPIGenerator
OpenAPISpec
OpenAPI 3.0 specification root object
PasswordFlow
Password flow
PathInfo
Describes a single (path, method) operation in an OpenAPI spec.
PrimitiveSchema
Primitive type Schema (string/integer/number/boolean)
RequestBody
Request body definition
SecurityRequirement
Security requirement: key-value mapping of required authentication schemes
Server
Environment server configuration
ServerVariable
Server variable (used for URL template substitution)
SwaggerUi
Tag
Interface grouping tag

Enums§

ApiKeyLocation
API Key location
Schema
Schema definition, supports reference, object, array, and primitive types
SecurityScheme
Authentication scheme, supports HTTP (Basic/Bearer), ApiKey, OAuth2

Functions§

model_to_openapi_schema
Converts a sz-orm Model definition into an OpenAPI 3.0 object Schema.