Skip to content

Commit

Permalink
Fix by comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
koval committed Sep 7, 2023
1 parent a37a9f9 commit 514b3f8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 22 deletions.
23 changes: 12 additions & 11 deletions huntflow_api_client/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ def jsonable_dict(
round_trip: bool = False,
warnings: bool = True,
) -> Dict[str, Any]:
params = {
"include": include,
"exclude": exclude,
"by_alias": by_alias,
"exclude_unset": exclude_unset,
"exclude_defaults": exclude_defaults,
"exclude_none": exclude_none,
"round_trip": round_trip,
"warnings": warnings,
}
return json.loads(self.model_dump_json(**params)) # type: ignore
return json.loads(
self.model_dump_json(
include=include,
exclude=exclude,
by_alias=by_alias,
exclude_unset=exclude_unset,
exclude_defaults=exclude_defaults,
exclude_none=exclude_none,
round_trip=round_trip,
warnings=warnings,
)
) # type: ignore


class PaginatedResponse(BaseModel):
Expand Down
9 changes: 3 additions & 6 deletions huntflow_api_client/models/request/resume.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@


class ApplicantResumeUpdateData(BaseModel):
body: Optional[str] = Field(None, description="Resume text")
body: Optional[str] = Field(..., description="Resume text")


class ApplicantResumeUpdateRequest(JsonRequestModel):
account_source: Optional[PositiveInt] = Field(None, description="Resume source ID")
data: Optional[ApplicantResumeUpdateData] = Field(
None,
description="Resume data",
)
account_source: Optional[PositiveInt] = Field(..., description="Resume source ID")
data: Optional[ApplicantResumeUpdateData] = Field(..., description="Resume data")
files: Optional[List[PositiveInt]] = Field(
[],
max_length=1,
Expand Down
4 changes: 2 additions & 2 deletions huntflow_api_client/models/response/applicant_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class BaseSurveySchemaType(BaseModel):


class SurveySchemaTypeQLogResponse(BaseSurveySchemaType):
title: Optional[str] = Field(None, description="Survey title")
title: Optional[str] = Field(..., description="Survey title")


class ApplicantLogSurveyQuestionary(BaseModel):
Expand Down Expand Up @@ -183,7 +183,7 @@ class CreateApplicantLogResponse(BaseModel):
rejection_reason: Optional[int] = Field(None, description="Rejection reason ID")
created: datetime = Field(..., description="Date and time of creation of the log")
employment_date: Optional[date] = Field(None, description="Employment date")
applicant_offer: Optional[ApplicantOffer] = Field(None, description="Offer object")
applicant_offer: Optional[ApplicantOffer] = Field(..., description="Offer object")
comment: Optional[str] = Field(None, description="Comment text")
files: List[File] = Field([], description="List of files attached to the log")
calendar_event: Optional[ApplicantLogCalendarEvent] = Field(
Expand Down
2 changes: 1 addition & 1 deletion huntflow_api_client/models/response/applicants.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ApplicantItem(Applicant):


class ApplicantListResponse(PaginatedResponse):
total_items: Optional[int] = Field(None, description="Total number of items")
total_items: Optional[int] = Field(..., description="Total number of items")
items: List[ApplicantItem] = Field(..., description="List of applicants")


Expand Down
2 changes: 1 addition & 1 deletion huntflow_api_client/models/response/coworkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ class ConfigDict:


class CoworkersListResponse(PaginatedResponse):
total_items: Optional[int] = Field(None, description="Total number of items")
total_items: Optional[int] = Field(..., description="Total number of items")
items: List[CoworkerResponse] = Field(..., description="List of coworkers")
2 changes: 1 addition & 1 deletion huntflow_api_client/models/response/vacancies.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def dict(self, *args, **kwargs): # type: ignore


class VacancyListResponse(PaginatedResponse):
total_items: Optional[int] = Field(None, description="Total number of items")
total_items: Optional[int] = Field(..., description="Total number of items")
items: List[VacancyItem]


Expand Down

0 comments on commit 514b3f8

Please sign in to comment.