| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- import pydantic
- class user_login_request(pydantic.BaseModel):
- nick: str
- password: str
- model_config = {
- "json_schema_extra": {
- "excamples": [
- {
- "nick": "test",
- "password": "QWERTYZ"
- }
- ]
- }
- }
- class user_get_request(pydantic.BaseModel):
- apikey: str
-
- model_config = {
- "json_schema_extra": {
- "excamples": [
- {
- "apikey": "af...699",
- }
- ]
- }
- }
- class product_request(pydantic.BaseModel):
- apikey: str
- name: str
- description: str
- author: str
- image: str
- stock_count: int
- barcode: str
-
- model_config = {
- "json_schema_extra": {
- "excamples": [
- {
- "apikey": "af...69",
- "name": "Product Name",
- "description": "Product description.",
- "author": "Product author.",
- "image": "https://api.com/image.png",
- "stocik_count": 10,
- "barcode": "509282819938"
- }
- ]
- }
- }
- class apikey_request(pydantic.BaseModel):
- apikey: str
-
- model_config = {
- "json_schema_extra": {
- "excamples": [
- {
- "apikey": "af...699",
- }
- ]
- }
- }
|