fix: intake questionnaire typing
The docs were not generating correctly when using the Json type. A class with placeholder properties has been created instead.
This commit is contained in:
parent
f54876eac6
commit
7d84f33bfa
1 changed files with 9 additions and 4 deletions
|
|
@ -5,23 +5,28 @@ Models:
|
|||
- List: Description
|
||||
- Models: Description
|
||||
"""
|
||||
from typing import Optional, Any
|
||||
from pydantic import Json
|
||||
from typing import Optional
|
||||
|
||||
from src.schemas import CustomBaseModel
|
||||
from src.organisation.constants import Status, ContactType
|
||||
|
||||
|
||||
class OrgQuestionnaire(CustomBaseModel):
|
||||
question_one: str
|
||||
question_two: str
|
||||
question_three: str
|
||||
|
||||
|
||||
class OrgOrgPostRequest(CustomBaseModel):
|
||||
name: str
|
||||
intake_questionnaire: Optional[Json[Any]] = None
|
||||
intake_questionnaire: Optional[OrgQuestionnaire] = None
|
||||
|
||||
billing_contact_id: Optional[int] = None
|
||||
security_contact_id: Optional[int] = None
|
||||
owner_contact_id: Optional[int] = None
|
||||
|
||||
class OrgQuestionnairePatchRequest(CustomBaseModel):
|
||||
intake_questionnaire: Json[Any]
|
||||
intake_questionnaire: OrgQuestionnaire
|
||||
partial: bool
|
||||
|
||||
class OrgStatusPatchRequest(CustomBaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue