Skip to content

Commit

Permalink
chore: update openapi (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
alarv authored Nov 22, 2024
1 parent 68b35e1 commit 9868e43
Show file tree
Hide file tree
Showing 12 changed files with 1,070 additions and 12 deletions.
3 changes: 3 additions & 0 deletions jaqpotpy/api/openapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
__version__ = "1.0.0"

# import apis into sdk package
from jaqpotpy.api.openapi.api.user_settings_api import UserSettingsApi
from jaqpotpy.api.openapi.api.api_keys_api import ApiKeysApi
from jaqpotpy.api.openapi.api.auth_api import AuthApi
from jaqpotpy.api.openapi.api.dataset_api import DatasetApi
Expand Down Expand Up @@ -84,9 +85,11 @@
from jaqpotpy.api.openapi.models.prediction_model import PredictionModel
from jaqpotpy.api.openapi.models.prediction_request import PredictionRequest
from jaqpotpy.api.openapi.models.prediction_response import PredictionResponse
from jaqpotpy.api.openapi.models.r_pbpk_config import RPbpkConfig
from jaqpotpy.api.openapi.models.regression_scores import RegressionScores
from jaqpotpy.api.openapi.models.scores import Scores
from jaqpotpy.api.openapi.models.transformer import Transformer
from jaqpotpy.api.openapi.models.update_api_key200_response import UpdateApiKey200Response
from jaqpotpy.api.openapi.models.update_api_key_request import UpdateApiKeyRequest
from jaqpotpy.api.openapi.models.user import User
from jaqpotpy.api.openapi.models.user_settings import UserSettings
1 change: 1 addition & 0 deletions jaqpotpy/api/openapi/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# flake8: noqa

# import apis into api package
from jaqpotpy.api.openapi.api.user_settings_api import UserSettingsApi
from jaqpotpy.api.openapi.api.api_keys_api import ApiKeysApi
from jaqpotpy.api.openapi.api.auth_api import AuthApi
from jaqpotpy.api.openapi.api.dataset_api import DatasetApi
Expand Down
296 changes: 296 additions & 0 deletions jaqpotpy/api/openapi/api/model_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,302 @@ def _delete_model_by_id_serialize(



@validate_call
def get_all_models(
self,
page: Optional[StrictInt] = None,
size: Optional[StrictInt] = None,
sort: Optional[List[StrictStr]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> GetModels200Response:
"""Get paginated models
:param page:
:type page: int
:param size:
:type size: int
:param sort:
:type sort: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._get_all_models_serialize(
page=page,
size=size,
sort=sort,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)

_response_types_map: Dict[str, Optional[str]] = {
'200': "GetModels200Response",
'400': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data


@validate_call
def get_all_models_with_http_info(
self,
page: Optional[StrictInt] = None,
size: Optional[StrictInt] = None,
sort: Optional[List[StrictStr]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[GetModels200Response]:
"""Get paginated models
:param page:
:type page: int
:param size:
:type size: int
:param sort:
:type sort: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._get_all_models_serialize(
page=page,
size=size,
sort=sort,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)

_response_types_map: Dict[str, Optional[str]] = {
'200': "GetModels200Response",
'400': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)


@validate_call
def get_all_models_without_preload_content(
self,
page: Optional[StrictInt] = None,
size: Optional[StrictInt] = None,
sort: Optional[List[StrictStr]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Get paginated models
:param page:
:type page: int
:param size:
:type size: int
:param sort:
:type sort: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._get_all_models_serialize(
page=page,
size=size,
sort=sort,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)

_response_types_map: Dict[str, Optional[str]] = {
'200': "GetModels200Response",
'400': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response


def _get_all_models_serialize(
self,
page,
size,
sort,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:

_host = None

_collection_formats: Dict[str, str] = {
'sort': 'multi',
}

_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_body_params: Optional[bytes] = None

# process the path parameters
# process the query parameters
if page is not None:

_query_params.append(('page', page))

if size is not None:

_query_params.append(('size', size))

if sort is not None:

_query_params.append(('sort', sort))

# process the header parameters
# process the form parameters
# process the body parameter


# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)


# authentication setting
_auth_settings: List[str] = [
'bearerAuth'
]

return self.api_client.param_serialize(
method='GET',
resource_path='/v1/models',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)




@validate_call
def get_legacy_model_by_id(
self,
Expand Down
Loading

0 comments on commit 9868e43

Please sign in to comment.