-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from dmabry/bugfix/fix-qa-validation
WebResponse QAPage/QA Validation Fix
- Loading branch information
Showing
3 changed files
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
from pydantic import BaseModel | ||
from pydantic import Field | ||
from typing import Optional | ||
|
||
|
||
class Answer(BaseModel): | ||
"""A response representing an answer to a question on a forum.""" | ||
|
||
text: str = Field(description="The main content of the answer.") | ||
author: str = Field(description="A name string for the author of the answer.") | ||
upvoteCount: int = Field(description="Number of upvotes on the answer.") | ||
downvoteCount: int = Field(description="The number of downvotes on the answer.") | ||
author: Optional[str] = Field(default=None, description="A name string for the author of the answer.") | ||
upvoteCount: Optional[int] = Field(default=None, description="Number of upvotes on the answer.") | ||
downvoteCount: Optional[int] = Field(default=None, description="The number of downvotes on the answer.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters