Models
openapi_first.templates.model_app.models
Pydantic domain models for the CRUD example.
This module defines Pydantic models that represent the domain entities used by the service. These models are referenced by the OpenAPI specification for request and response schemas.
The models are declarative and framework-agnostic. They contain no persistence logic, validation beyond type constraints, or business behavior.
This module is not part of the openapi_first library API surface.
It exists solely to support the example application template.
Classes
Item
Bases: ItemBase
Domain model for a persisted item.
This model represents the full item state returned in responses, including the server-assigned identifier.
ItemBase
Bases: BaseModel
Base domain model for an item.
Defines fields common to all item representations.
ItemCreate
Bases: ItemBase
Domain model for item creation requests.
This model is used for request bodies when creating new items.
It intentionally excludes the id field, which is assigned
by the service.