feat(scaffold): add model-backed CRUD service template
Provides a complete OpenAPI-first CRUD example with a Pydantic model layer, explicit runtime semantics, and integration tests to support developer onboarding and real-world service structure.
This commit is contained in:
18
openapi_first/templates/model_app/models.py
Normal file
18
openapi_first/templates/model_app/models.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Pydantic domain models for the CRUD example.
|
||||
"""
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class ItemBase(BaseModel):
|
||||
name: str
|
||||
price: float
|
||||
|
||||
|
||||
class ItemCreate(ItemBase):
|
||||
pass
|
||||
|
||||
|
||||
class Item(ItemBase):
|
||||
id: int
|
||||
Reference in New Issue
Block a user