Skip to content

Add Pydantic request/response schemas #3

Description

@ddvlamin

Description

Create Pydantic models for API request validation and response serialization.

Files

  • Create: app/schemas.py

Schemas Needed

  • ShoppingListCreate, ShoppingListResponse, ShoppingListDetailResponse (with items)
  • ShoppingListItemCreate, BulkItemsCreate, ShoppingListItemResponse, ShoppingListItemUpdate

Details

  • All response schemas use model_config = {"from_attributes": True} for ORM compatibility
  • ShoppingListDetailResponse includes items list
  • ShoppingListItemUpdate uses optional fields for partial updates

Acceptance Criteria

  • Schemas import correctly
  • Validation rejects empty name on create

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions