Jonathan Ballet 22a0fc1727
python: adjust basic typing information (#17511)
* python: adjust basic typing information

This is an initial pass to fix and adjust the typing information for the
generated client. This is enough to have mypy runnning without complains
on all the (modern) generated clients (Pydantic v1 code is not checked
for instance)

mypy is also now run directly in the CI, so further changes will also be
checked and thus, will need to be compliant with good typing
information.

Note that this doesn't *fully* type all the code: mypy is not run in
"strict" mode and there are still many functions/methods/attributes
which are still not fully typed, but it's a first good step in that
direction.

* ApiResponse's raw_data can't be None

* Fix indentation

* Revert test changes

* run mypy on tests/ directory

* don't forcefully convert the client response headers to dict

* override petstore ApiResponse model

* adjust type of 'any/one_of_schemas' fields
2024-01-06 15:40:42 +08:00

995 B

ModelApiResponse

Properties

Name Type Description Notes
code int [optional]
type str [optional]
message str [optional]

Example

from petstore_api.models.model_api_response import ModelApiResponse

# TODO update the JSON string below
json = "{}"
# create an instance of ModelApiResponse from a JSON string
model_api_response_instance = ModelApiResponse.from_json(json)
# print the JSON string representation of the object
print ModelApiResponse.to_json()

# convert the object into a dict
model_api_response_dict = model_api_response_instance.to_dict()
# create an instance of ModelApiResponse from a dict
model_api_response_form_dict = model_api_response.from_dict(model_api_response_dict)

[Back to Model list] [Back to API list] [Back to README]