Set up optional query parameters
This commit is contained in:
parent
12d4405654
commit
78b4dd3827
|
@ -6,23 +6,23 @@ class RegisterSchema(BaseModel):
|
|||
full_name: str
|
||||
email: EmailStr
|
||||
password: str
|
||||
gender: int = Query(le=1, ge=3)
|
||||
mobile: str = Query(min_length=8, max_length=13)
|
||||
gender: int = Query(None, le=1, ge=3)
|
||||
mobile: str = Query(None, min_length=8, max_length=13)
|
||||
user_image: str = None
|
||||
user_type: int = Query(le=1, ge=2)
|
||||
lang_type: int = Query(le=1, ge=2)
|
||||
device_type: int = Query(le=1, ge=2)
|
||||
user_type: int = Query(None, le=1, ge=2)
|
||||
lang_type: int = Query(None, le=1, ge=2)
|
||||
device_type: int = Query(None, le=1, ge=2)
|
||||
device_id: str
|
||||
|
||||
|
||||
class LoginSchema(BaseModel):
|
||||
email: EmailStr
|
||||
password: str
|
||||
user_type: int = Query(le=1, ge=2)
|
||||
lang_type: int = Query(le=1, ge=2)
|
||||
user_type: int = Query(None, le=1, ge=2)
|
||||
lang_type: int = Query(None, le=1, ge=2)
|
||||
device_id: str
|
||||
|
||||
|
||||
class OTPSchema(BaseModel):
|
||||
mobile: str = Query(min_length=8, max_length=13)
|
||||
otp: int = Query(le=6, ge=6)
|
||||
mobile: str = Query(None, min_length=8, max_length=13)
|
||||
otp: int = Query(None, le=6, ge=6)
|
||||
|
|
Loading…
Reference in New Issue