From 2b545b2f32ed2d087f964030a52f8c258eca9005 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Fri, 22 Jul 2022 15:45:30 -0400 Subject: [PATCH] Update query descriptions --- python/shroomdk/models/api/api_response.py | 6 ++---- python/shroomdk/models/api/create_query_resp.py | 4 +--- python/shroomdk/models/api/query_result_resp.py | 9 +++------ python/shroomdk/models/query.py | 2 +- python/shroomdk/models/query_result_set.py | 1 + python/shroomdk/models/query_run_stats.py | 2 +- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/python/shroomdk/models/api/api_response.py b/python/shroomdk/models/api/api_response.py index 798a015..11b9685 100644 --- a/python/shroomdk/models/api/api_response.py +++ b/python/shroomdk/models/api/api_response.py @@ -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] diff --git a/python/shroomdk/models/api/create_query_resp.py b/python/shroomdk/models/api/create_query_resp.py index eddded3..95a1163 100644 --- a/python/shroomdk/models/api/create_query_resp.py +++ b/python/shroomdk/models/api/create_query_resp.py @@ -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] diff --git a/python/shroomdk/models/api/query_result_resp.py b/python/shroomdk/models/api/query_result_resp.py index 3e05b36..3acf75c 100644 --- a/python/shroomdk/models/api/query_result_resp.py +++ b/python/shroomdk/models/api/query_result_resp.py @@ -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] diff --git a/python/shroomdk/models/query.py b/python/shroomdk/models/query.py index 68b8d69..0a3ec42 100644 --- a/python/shroomdk/models/query.py +++ b/python/shroomdk/models/query.py @@ -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") diff --git a/python/shroomdk/models/query_result_set.py b/python/shroomdk/models/query_result_set.py index e0243d7..7a0aa17 100644 --- a/python/shroomdk/models/query_result_set.py +++ b/python/shroomdk/models/query_result_set.py @@ -1,4 +1,5 @@ from typing import Any, List, Union + from pydantic import BaseModel, Field from .query_run_stats import QueryRunStats diff --git a/python/shroomdk/models/query_run_stats.py b/python/shroomdk/models/query_run_stats.py index d6a4f6b..91c29d4 100644 --- a/python/shroomdk/models/query_run_stats.py +++ b/python/shroomdk/models/query_run_stats.py @@ -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." )