Skip to content

Commit

Permalink
Enhance AccountRequest model with JSON schema example
Browse files Browse the repository at this point in the history
  • Loading branch information
gabino committed Jan 4, 2025
1 parent cd3a69d commit 7d5b59d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion examples/validators.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Optional

from cuenca_validations.types import QueryParams
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
import datetime as dt


Expand All @@ -26,6 +26,13 @@ class UserQuery(QueryParams):

class AccountRequest(BaseModel):
name: str
model_config = ConfigDict(
json_schema_extra={
'example': {
'name': 'Doroteo Arango',
}
}
)


class AccountResponse(BaseModel):
Expand Down

0 comments on commit 7d5b59d

Please sign in to comment.