Update query descriptions

This commit is contained in:
Jim Myers 2022-07-22 15:45:30 -04:00
parent b60b2ca1ad
commit 2b545b2f32
6 changed files with 9 additions and 15 deletions

View File

@ -1,12 +1,10 @@
from typing import Any, Union
from pydantic import BaseModel, Field
from pydantic import BaseModel
class ApiResponse(BaseModel):
status_code: int = Field(
None, description="The server-side token of the query being executed."
)
status_code: int
status_msg: Union[str, None]
error_msg: Union[str, None]
data: Union[Any, None]

View File

@ -18,6 +18,4 @@ class CreateQueryJson(BaseModel):
class CreateQueryResp(ApiResponse):
data: Union[CreateQueryJson, None] = Field(
False, description="The data payload result after attempting to create a query."
)
data: Union[CreateQueryJson, None]

View File

@ -1,12 +1,12 @@
from typing import Any, List, Optional, Union
from pydantic import BaseModel, Field
from pydantic import BaseModel
from .api_response import ApiResponse
class QueryResultJson(BaseModel):
queryId: Optional[str] = Field(None, description="The id of the query.")
queryId: Optional[str]
status: str
results: Optional[List[Any]]
startedAt: Optional[str]
@ -20,7 +20,4 @@ class QueryResultJson(BaseModel):
class QueryResultResp(ApiResponse):
data: Union[QueryResultJson, None] = Field(
False,
description="The data payload result after attempting to retrieve the query results.",
)
data: Union[QueryResultJson, None]

View File

@ -16,7 +16,7 @@ class Query(BaseModel):
)
cached: Optional[bool] = Field(
None,
description="An override on the cahce. A value of true will reexecute the query.",
description="An override on the cache. A value of true will Re-Execute the query.",
)
page_size: int = Field(None, description="The number of results to return per page")
page_number: int = Field(None, description="The page number to return")

View File

@ -1,4 +1,5 @@
from typing import Any, List, Union
from pydantic import BaseModel, Field
from .query_run_stats import QueryRunStats

View File

@ -11,5 +11,5 @@ class QueryRunStats(BaseModel):
description="The number of seconds elapsed between the start and end times.",
)
record_count: int = Field(
False, description="The number of records returned by the query."
None, description="The number of records returned by the query."
)