You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Selects the schema and serialization of the request body. value must be one of ['application/json']
accept_content_types
typing.Tuple[str]
default is ("application/json", )
Tells the server the content type(s) that are accepted by the client
server_index
typing.Optional[int]
default is None
Allows one to select a different server. If not None, must be one of [0, 1, 2]
stream
bool
default is False
if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout
typing.Optional[typing.Union[int, typing.Tuple]]
default is None
the timeout used by the rest client
skip_deserialization
bool
default is False
when True, headers and body will be unset and an instance of api_response.ApiResponseWithoutDeserialization will be returned
Return Types
HTTP Status Code
Class
Description
n/a
api_response.ApiResponseWithoutDeserialization
When skip_deserialization is True this response is returned
Set the available servers by defining your used servers in ApiConfiguration.server_info
Then select your server by setting a server index in ApiConfiguration.server_index_info or by
passing server_index in to the endpoint method.
importpetstore_apifrompetstore_api.configurationsimportapi_configurationfrompetstore_api.apis.tagsimportfake_apifrompprintimportpprintused_configuration=api_configuration.ApiConfiguration(
)
# Enter a context with an instance of the API clientwithpetstore_api.ApiClient(used_configuration) asapi_client:
# Create an instance of the API classapi_instance=fake_api.FakeApi(api_client)
# example passing only required values which don't have defaults setbody=client.Client.validate({
"client": "client_example",
})
try:
# To test \\\"client\\\" modelapi_response=api_instance.client_model(
body=body,
)
pprint(api_response)
exceptpetstore_api.ApiExceptionase:
print("Exception when calling FakeApi->client_model: %s\n"%e)