forked from loafle/openapi-generator-original
python: copy the current Python generator into a "pydantic v1" generator (#16656)
* Copy the current Python generator into a "pydantic v1" generator This generator will be deprecated over time and the normal generator will focus on Pydantic v2. * add missing doc
This commit is contained in:
38
samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.github/workflows/python.yml
vendored
Normal file
38
samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.github/workflows/python.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# NOTE: This file is auto generated by OpenAPI Generator.
|
||||
# URL: https://openapi-generator.tech
|
||||
#
|
||||
# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
||||
|
||||
name: petstore_api Python package
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8 pytest
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest
|
||||
66
samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.gitignore
vendored
Normal file
66
samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.gitignore
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
env/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
#Ipython Notebook
|
||||
.ipynb_checkpoints
|
||||
@@ -0,0 +1,31 @@
|
||||
# NOTE: This file is auto generated by OpenAPI Generator.
|
||||
# URL: https://openapi-generator.tech
|
||||
#
|
||||
# ref: https://docs.gitlab.com/ee/ci/README.html
|
||||
# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
|
||||
|
||||
stages:
|
||||
- test
|
||||
|
||||
.pytest:
|
||||
stage: test
|
||||
script:
|
||||
- pip install -r requirements.txt
|
||||
- pip install -r test-requirements.txt
|
||||
- pytest --cov=petstore_api
|
||||
|
||||
pytest-3.7:
|
||||
extends: .pytest
|
||||
image: python:3.7-alpine
|
||||
pytest-3.8:
|
||||
extends: .pytest
|
||||
image: python:3.8-alpine
|
||||
pytest-3.9:
|
||||
extends: .pytest
|
||||
image: python:3.9-alpine
|
||||
pytest-3.10:
|
||||
extends: .pytest
|
||||
image: python:3.10-alpine
|
||||
pytest-3.11:
|
||||
extends: .pytest
|
||||
image: python:3.11-alpine
|
||||
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@@ -0,0 +1,195 @@
|
||||
.github/workflows/python.yml
|
||||
.gitignore
|
||||
.gitlab-ci.yml
|
||||
.travis.yml
|
||||
README.md
|
||||
docs/AdditionalPropertiesAnyType.md
|
||||
docs/AdditionalPropertiesClass.md
|
||||
docs/AdditionalPropertiesObject.md
|
||||
docs/AdditionalPropertiesWithDescriptionOnly.md
|
||||
docs/AllOfWithSingleRef.md
|
||||
docs/Animal.md
|
||||
docs/AnotherFakeApi.md
|
||||
docs/AnyOfColor.md
|
||||
docs/AnyOfPig.md
|
||||
docs/ApiResponse.md
|
||||
docs/ArrayOfArrayOfModel.md
|
||||
docs/ArrayOfArrayOfNumberOnly.md
|
||||
docs/ArrayOfNumberOnly.md
|
||||
docs/ArrayTest.md
|
||||
docs/BasquePig.md
|
||||
docs/Capitalization.md
|
||||
docs/Cat.md
|
||||
docs/Category.md
|
||||
docs/CircularReferenceModel.md
|
||||
docs/ClassModel.md
|
||||
docs/Client.md
|
||||
docs/Color.md
|
||||
docs/Creature.md
|
||||
docs/CreatureInfo.md
|
||||
docs/DanishPig.md
|
||||
docs/DefaultApi.md
|
||||
docs/DeprecatedObject.md
|
||||
docs/Dog.md
|
||||
docs/DummyModel.md
|
||||
docs/EnumArrays.md
|
||||
docs/EnumClass.md
|
||||
docs/EnumString1.md
|
||||
docs/EnumString2.md
|
||||
docs/EnumTest.md
|
||||
docs/FakeApi.md
|
||||
docs/FakeClassnameTags123Api.md
|
||||
docs/File.md
|
||||
docs/FileSchemaTestClass.md
|
||||
docs/FirstRef.md
|
||||
docs/Foo.md
|
||||
docs/FooGetDefaultResponse.md
|
||||
docs/FormatTest.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InnerDictWithProperty.md
|
||||
docs/IntOrString.md
|
||||
docs/List.md
|
||||
docs/MapOfArrayOfModel.md
|
||||
docs/MapTest.md
|
||||
docs/MixedPropertiesAndAdditionalPropertiesClass.md
|
||||
docs/Model200Response.md
|
||||
docs/ModelReturn.md
|
||||
docs/Name.md
|
||||
docs/NullableClass.md
|
||||
docs/NullableProperty.md
|
||||
docs/NumberOnly.md
|
||||
docs/ObjectToTestAdditionalProperties.md
|
||||
docs/ObjectWithDeprecatedFields.md
|
||||
docs/OneOfEnumString.md
|
||||
docs/Order.md
|
||||
docs/OuterComposite.md
|
||||
docs/OuterEnum.md
|
||||
docs/OuterEnumDefaultValue.md
|
||||
docs/OuterEnumInteger.md
|
||||
docs/OuterEnumIntegerDefaultValue.md
|
||||
docs/OuterObjectWithEnumProperty.md
|
||||
docs/Parent.md
|
||||
docs/ParentWithOptionalDict.md
|
||||
docs/Pet.md
|
||||
docs/PetApi.md
|
||||
docs/Pig.md
|
||||
docs/PropertyNameCollision.md
|
||||
docs/ReadOnlyFirst.md
|
||||
docs/SecondRef.md
|
||||
docs/SelfReferenceModel.md
|
||||
docs/SingleRefType.md
|
||||
docs/SpecialCharacterEnum.md
|
||||
docs/SpecialModelName.md
|
||||
docs/SpecialName.md
|
||||
docs/StoreApi.md
|
||||
docs/Tag.md
|
||||
docs/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/Tiger.md
|
||||
docs/User.md
|
||||
docs/UserApi.md
|
||||
docs/WithNestedOneOf.md
|
||||
git_push.sh
|
||||
petstore_api/__init__.py
|
||||
petstore_api/api/__init__.py
|
||||
petstore_api/api/another_fake_api.py
|
||||
petstore_api/api/default_api.py
|
||||
petstore_api/api/fake_api.py
|
||||
petstore_api/api/fake_classname_tags123_api.py
|
||||
petstore_api/api/pet_api.py
|
||||
petstore_api/api/store_api.py
|
||||
petstore_api/api/user_api.py
|
||||
petstore_api/api_client.py
|
||||
petstore_api/api_response.py
|
||||
petstore_api/configuration.py
|
||||
petstore_api/exceptions.py
|
||||
petstore_api/models/__init__.py
|
||||
petstore_api/models/additional_properties_any_type.py
|
||||
petstore_api/models/additional_properties_class.py
|
||||
petstore_api/models/additional_properties_object.py
|
||||
petstore_api/models/additional_properties_with_description_only.py
|
||||
petstore_api/models/all_of_with_single_ref.py
|
||||
petstore_api/models/animal.py
|
||||
petstore_api/models/any_of_color.py
|
||||
petstore_api/models/any_of_pig.py
|
||||
petstore_api/models/api_response.py
|
||||
petstore_api/models/array_of_array_of_model.py
|
||||
petstore_api/models/array_of_array_of_number_only.py
|
||||
petstore_api/models/array_of_number_only.py
|
||||
petstore_api/models/array_test.py
|
||||
petstore_api/models/basque_pig.py
|
||||
petstore_api/models/capitalization.py
|
||||
petstore_api/models/cat.py
|
||||
petstore_api/models/category.py
|
||||
petstore_api/models/circular_reference_model.py
|
||||
petstore_api/models/class_model.py
|
||||
petstore_api/models/client.py
|
||||
petstore_api/models/color.py
|
||||
petstore_api/models/creature.py
|
||||
petstore_api/models/creature_info.py
|
||||
petstore_api/models/danish_pig.py
|
||||
petstore_api/models/deprecated_object.py
|
||||
petstore_api/models/dog.py
|
||||
petstore_api/models/dummy_model.py
|
||||
petstore_api/models/enum_arrays.py
|
||||
petstore_api/models/enum_class.py
|
||||
petstore_api/models/enum_string1.py
|
||||
petstore_api/models/enum_string2.py
|
||||
petstore_api/models/enum_test.py
|
||||
petstore_api/models/file.py
|
||||
petstore_api/models/file_schema_test_class.py
|
||||
petstore_api/models/first_ref.py
|
||||
petstore_api/models/foo.py
|
||||
petstore_api/models/foo_get_default_response.py
|
||||
petstore_api/models/format_test.py
|
||||
petstore_api/models/has_only_read_only.py
|
||||
petstore_api/models/health_check_result.py
|
||||
petstore_api/models/inner_dict_with_property.py
|
||||
petstore_api/models/int_or_string.py
|
||||
petstore_api/models/list.py
|
||||
petstore_api/models/map_of_array_of_model.py
|
||||
petstore_api/models/map_test.py
|
||||
petstore_api/models/mixed_properties_and_additional_properties_class.py
|
||||
petstore_api/models/model200_response.py
|
||||
petstore_api/models/model_return.py
|
||||
petstore_api/models/name.py
|
||||
petstore_api/models/nullable_class.py
|
||||
petstore_api/models/nullable_property.py
|
||||
petstore_api/models/number_only.py
|
||||
petstore_api/models/object_to_test_additional_properties.py
|
||||
petstore_api/models/object_with_deprecated_fields.py
|
||||
petstore_api/models/one_of_enum_string.py
|
||||
petstore_api/models/order.py
|
||||
petstore_api/models/outer_composite.py
|
||||
petstore_api/models/outer_enum.py
|
||||
petstore_api/models/outer_enum_default_value.py
|
||||
petstore_api/models/outer_enum_integer.py
|
||||
petstore_api/models/outer_enum_integer_default_value.py
|
||||
petstore_api/models/outer_object_with_enum_property.py
|
||||
petstore_api/models/parent.py
|
||||
petstore_api/models/parent_with_optional_dict.py
|
||||
petstore_api/models/pet.py
|
||||
petstore_api/models/pig.py
|
||||
petstore_api/models/property_name_collision.py
|
||||
petstore_api/models/read_only_first.py
|
||||
petstore_api/models/second_ref.py
|
||||
petstore_api/models/self_reference_model.py
|
||||
petstore_api/models/single_ref_type.py
|
||||
petstore_api/models/special_character_enum.py
|
||||
petstore_api/models/special_model_name.py
|
||||
petstore_api/models/special_name.py
|
||||
petstore_api/models/tag.py
|
||||
petstore_api/models/test_inline_freeform_additional_properties_request.py
|
||||
petstore_api/models/tiger.py
|
||||
petstore_api/models/user.py
|
||||
petstore_api/models/with_nested_one_of.py
|
||||
petstore_api/py.typed
|
||||
petstore_api/rest.py
|
||||
petstore_api/signing.py
|
||||
pyproject.toml
|
||||
requirements.txt
|
||||
setup.cfg
|
||||
setup.py
|
||||
test-requirements.txt
|
||||
test/__init__.py
|
||||
tox.ini
|
||||
@@ -0,0 +1 @@
|
||||
7.1.0-SNAPSHOT
|
||||
@@ -0,0 +1,17 @@
|
||||
# ref: https://docs.travis-ci.com/user/languages/python
|
||||
language: python
|
||||
python:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
# uncomment the following if needed
|
||||
#- "3.11-dev" # 3.11 development branch
|
||||
#- "nightly" # nightly build
|
||||
# command to install dependencies
|
||||
install:
|
||||
- "pip install -r requirements.txt"
|
||||
- "pip install -r test-requirements.txt"
|
||||
# command to run tests
|
||||
script: pytest --cov=petstore_api
|
||||
@@ -0,0 +1,268 @@
|
||||
# petstore-api
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build package: org.openapitools.codegen.languages.PythonClientPydanticV1Codegen
|
||||
|
||||
## Requirements.
|
||||
|
||||
Python 3.7+
|
||||
|
||||
## Installation & Usage
|
||||
### pip install
|
||||
|
||||
If the python package is hosted on a repository, you can install directly using:
|
||||
|
||||
```sh
|
||||
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
||||
```
|
||||
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
|
||||
|
||||
Then import the package:
|
||||
```python
|
||||
import petstore_api
|
||||
```
|
||||
|
||||
### Setuptools
|
||||
|
||||
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
||||
|
||||
```sh
|
||||
python setup.py install --user
|
||||
```
|
||||
(or `sudo python setup.py install` to install the package for all users)
|
||||
|
||||
Then import the package:
|
||||
```python
|
||||
import petstore_api
|
||||
```
|
||||
|
||||
### Tests
|
||||
|
||||
Execute `pytest` to run the tests.
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please follow the [installation procedure](#installation--usage) and then run the following:
|
||||
|
||||
```python
|
||||
import datetime
|
||||
import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.AnotherFakeApi(api_client)
|
||||
client = petstore_api.Client() # Client | client model
|
||||
|
||||
try:
|
||||
# To test special tags
|
||||
api_response = await api_instance.call_123_test_special_tags(client)
|
||||
print("The response of AnotherFakeApi->call_123_test_special_tags:\n")
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)
|
||||
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
|
||||
*FakeApi* | [**fake_any_type_request_body**](docs/FakeApi.md#fake_any_type_request_body) | **POST** /fake/any_type_body | test any type request body
|
||||
*FakeApi* | [**fake_enum_ref_query_parameter**](docs/FakeApi.md#fake_enum_ref_query_parameter) | **GET** /fake/enum_ref_query_parameter | test enum reference query parameter
|
||||
*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
||||
*FakeApi* | [**fake_http_signature_test**](docs/FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
|
||||
*FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
||||
*FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
|
||||
*FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**fake_property_enum_integer_serialize**](docs/FakeApi.md#fake_property_enum_integer_serialize) | **POST** /fake/property/enum-int |
|
||||
*FakeApi* | [**fake_return_list_of_objects**](docs/FakeApi.md#fake_return_list_of_objects) | **GET** /fake/return_list_of_object | test returning list of objects
|
||||
*FakeApi* | [**fake_uuid_example**](docs/FakeApi.md#fake_uuid_example) | **GET** /fake/uuid_example | test uuid example
|
||||
*FakeApi* | [**test_body_with_binary**](docs/FakeApi.md#test_body_with_binary) | **PUT** /fake/body-with-binary |
|
||||
*FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
|
||||
*FakeApi* | [**test_date_time_query_parameter**](docs/FakeApi.md#test_date_time_query_parameter) | **PUT** /fake/date-time-query-params |
|
||||
*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**test_inline_freeform_additional_properties**](docs/FakeApi.md#test_inline_freeform_additional_properties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties
|
||||
*FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**test_query_parameter_collection_format**](docs/FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-parameters |
|
||||
*FakeClassnameTags123Api* | [**test_classname**](docs/FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
|
||||
*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
|
||||
*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
|
||||
*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **GET** /user/login | Logs user into the system
|
||||
*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
|
||||
*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md)
|
||||
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||
- [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md)
|
||||
- [AdditionalPropertiesWithDescriptionOnly](docs/AdditionalPropertiesWithDescriptionOnly.md)
|
||||
- [AllOfWithSingleRef](docs/AllOfWithSingleRef.md)
|
||||
- [Animal](docs/Animal.md)
|
||||
- [AnyOfColor](docs/AnyOfColor.md)
|
||||
- [AnyOfPig](docs/AnyOfPig.md)
|
||||
- [ApiResponse](docs/ApiResponse.md)
|
||||
- [ArrayOfArrayOfModel](docs/ArrayOfArrayOfModel.md)
|
||||
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [ArrayTest](docs/ArrayTest.md)
|
||||
- [BasquePig](docs/BasquePig.md)
|
||||
- [Capitalization](docs/Capitalization.md)
|
||||
- [Cat](docs/Cat.md)
|
||||
- [Category](docs/Category.md)
|
||||
- [CircularReferenceModel](docs/CircularReferenceModel.md)
|
||||
- [ClassModel](docs/ClassModel.md)
|
||||
- [Client](docs/Client.md)
|
||||
- [Color](docs/Color.md)
|
||||
- [Creature](docs/Creature.md)
|
||||
- [CreatureInfo](docs/CreatureInfo.md)
|
||||
- [DanishPig](docs/DanishPig.md)
|
||||
- [DeprecatedObject](docs/DeprecatedObject.md)
|
||||
- [Dog](docs/Dog.md)
|
||||
- [DummyModel](docs/DummyModel.md)
|
||||
- [EnumArrays](docs/EnumArrays.md)
|
||||
- [EnumClass](docs/EnumClass.md)
|
||||
- [EnumString1](docs/EnumString1.md)
|
||||
- [EnumString2](docs/EnumString2.md)
|
||||
- [EnumTest](docs/EnumTest.md)
|
||||
- [File](docs/File.md)
|
||||
- [FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [FirstRef](docs/FirstRef.md)
|
||||
- [Foo](docs/Foo.md)
|
||||
- [FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
|
||||
- [FormatTest](docs/FormatTest.md)
|
||||
- [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [InnerDictWithProperty](docs/InnerDictWithProperty.md)
|
||||
- [IntOrString](docs/IntOrString.md)
|
||||
- [List](docs/List.md)
|
||||
- [MapOfArrayOfModel](docs/MapOfArrayOfModel.md)
|
||||
- [MapTest](docs/MapTest.md)
|
||||
- [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
- [Model200Response](docs/Model200Response.md)
|
||||
- [ModelReturn](docs/ModelReturn.md)
|
||||
- [Name](docs/Name.md)
|
||||
- [NullableClass](docs/NullableClass.md)
|
||||
- [NullableProperty](docs/NullableProperty.md)
|
||||
- [NumberOnly](docs/NumberOnly.md)
|
||||
- [ObjectToTestAdditionalProperties](docs/ObjectToTestAdditionalProperties.md)
|
||||
- [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
|
||||
- [OneOfEnumString](docs/OneOfEnumString.md)
|
||||
- [Order](docs/Order.md)
|
||||
- [OuterComposite](docs/OuterComposite.md)
|
||||
- [OuterEnum](docs/OuterEnum.md)
|
||||
- [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
|
||||
- [OuterEnumInteger](docs/OuterEnumInteger.md)
|
||||
- [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
|
||||
- [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md)
|
||||
- [Parent](docs/Parent.md)
|
||||
- [ParentWithOptionalDict](docs/ParentWithOptionalDict.md)
|
||||
- [Pet](docs/Pet.md)
|
||||
- [Pig](docs/Pig.md)
|
||||
- [PropertyNameCollision](docs/PropertyNameCollision.md)
|
||||
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [SecondRef](docs/SecondRef.md)
|
||||
- [SelfReferenceModel](docs/SelfReferenceModel.md)
|
||||
- [SingleRefType](docs/SingleRefType.md)
|
||||
- [SpecialCharacterEnum](docs/SpecialCharacterEnum.md)
|
||||
- [SpecialModelName](docs/SpecialModelName.md)
|
||||
- [SpecialName](docs/SpecialName.md)
|
||||
- [Tag](docs/Tag.md)
|
||||
- [TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md)
|
||||
- [Tiger](docs/Tiger.md)
|
||||
- [User](docs/User.md)
|
||||
- [WithNestedOneOf](docs/WithNestedOneOf.md)
|
||||
|
||||
|
||||
<a id="documentation-for-authorization"></a>
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
Authentication schemes defined for the API:
|
||||
<a id="petstore_auth"></a>
|
||||
### petstore_auth
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- **write:pets**: modify pets in your account
|
||||
- **read:pets**: read your pets
|
||||
|
||||
<a id="api_key"></a>
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
<a id="api_key_query"></a>
|
||||
### api_key_query
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key_query
|
||||
- **Location**: URL query string
|
||||
|
||||
<a id="http_basic_test"></a>
|
||||
### http_basic_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
<a id="bearer_test"></a>
|
||||
### bearer_test
|
||||
|
||||
- **Type**: Bearer authentication (JWT)
|
||||
|
||||
<a id="http_signature_test"></a>
|
||||
### http_signature_test
|
||||
|
||||
- **Type**: HTTP signature authentication
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# AdditionalPropertiesAnyType
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.additional_properties_any_type import AdditionalPropertiesAnyType
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AdditionalPropertiesAnyType from a JSON string
|
||||
additional_properties_any_type_instance = AdditionalPropertiesAnyType.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print AdditionalPropertiesAnyType.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
additional_properties_any_type_dict = additional_properties_any_type_instance.to_dict()
|
||||
# create an instance of AdditionalPropertiesAnyType from a dict
|
||||
additional_properties_any_type_form_dict = additional_properties_any_type.from_dict(additional_properties_any_type_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# AdditionalPropertiesClass
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**map_property** | **Dict[str, str]** | | [optional]
|
||||
**map_of_map_property** | **Dict[str, Dict[str, str]]** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.additional_properties_class import AdditionalPropertiesClass
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AdditionalPropertiesClass from a JSON string
|
||||
additional_properties_class_instance = AdditionalPropertiesClass.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print AdditionalPropertiesClass.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
additional_properties_class_dict = additional_properties_class_instance.to_dict()
|
||||
# create an instance of AdditionalPropertiesClass from a dict
|
||||
additional_properties_class_form_dict = additional_properties_class.from_dict(additional_properties_class_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# AdditionalPropertiesObject
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.additional_properties_object import AdditionalPropertiesObject
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AdditionalPropertiesObject from a JSON string
|
||||
additional_properties_object_instance = AdditionalPropertiesObject.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print AdditionalPropertiesObject.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
additional_properties_object_dict = additional_properties_object_instance.to_dict()
|
||||
# create an instance of AdditionalPropertiesObject from a dict
|
||||
additional_properties_object_form_dict = additional_properties_object.from_dict(additional_properties_object_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# AdditionalPropertiesWithDescriptionOnly
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.additional_properties_with_description_only import AdditionalPropertiesWithDescriptionOnly
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AdditionalPropertiesWithDescriptionOnly from a JSON string
|
||||
additional_properties_with_description_only_instance = AdditionalPropertiesWithDescriptionOnly.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print AdditionalPropertiesWithDescriptionOnly.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
additional_properties_with_description_only_dict = additional_properties_with_description_only_instance.to_dict()
|
||||
# create an instance of AdditionalPropertiesWithDescriptionOnly from a dict
|
||||
additional_properties_with_description_only_form_dict = additional_properties_with_description_only.from_dict(additional_properties_with_description_only_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# AllOfWithSingleRef
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**username** | **str** | | [optional]
|
||||
**single_ref_type** | [**SingleRefType**](SingleRefType.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.all_of_with_single_ref import AllOfWithSingleRef
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AllOfWithSingleRef from a JSON string
|
||||
all_of_with_single_ref_instance = AllOfWithSingleRef.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print AllOfWithSingleRef.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
all_of_with_single_ref_dict = all_of_with_single_ref_instance.to_dict()
|
||||
# create an instance of AllOfWithSingleRef from a dict
|
||||
all_of_with_single_ref_form_dict = all_of_with_single_ref.from_dict(all_of_with_single_ref_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Animal
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **str** | |
|
||||
**color** | **str** | | [optional] [default to 'red']
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.animal import Animal
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Animal from a JSON string
|
||||
animal_instance = Animal.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Animal.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
animal_dict = animal_instance.to_dict()
|
||||
# create an instance of Animal from a dict
|
||||
animal_form_dict = animal.from_dict(animal_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
# petstore_api.AnotherFakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**call_123_test_special_tags**](AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
|
||||
|
||||
# **call_123_test_special_tags**
|
||||
> Client call_123_test_special_tags(client)
|
||||
|
||||
To test special tags
|
||||
|
||||
To test special tags and operation ID starting with number
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.client import Client
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.AnotherFakeApi(api_client)
|
||||
client = petstore_api.Client() # Client | client model
|
||||
|
||||
try:
|
||||
# To test special tags
|
||||
api_response = await api_instance.call_123_test_special_tags(client)
|
||||
print("The response of AnotherFakeApi->call_123_test_special_tags:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# AnyOfColor
|
||||
|
||||
Any of RGB array, RGBA array, or hex string.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.any_of_color import AnyOfColor
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AnyOfColor from a JSON string
|
||||
any_of_color_instance = AnyOfColor.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print AnyOfColor.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
any_of_color_dict = any_of_color_instance.to_dict()
|
||||
# create an instance of AnyOfColor from a dict
|
||||
any_of_color_form_dict = any_of_color.from_dict(any_of_color_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# AnyOfPig
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **str** | |
|
||||
**color** | **str** | |
|
||||
**size** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.any_of_pig import AnyOfPig
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AnyOfPig from a JSON string
|
||||
any_of_pig_instance = AnyOfPig.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print AnyOfPig.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
any_of_pig_dict = any_of_pig_instance.to_dict()
|
||||
# create an instance of AnyOfPig from a dict
|
||||
any_of_pig_form_dict = any_of_pig.from_dict(any_of_pig_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ApiResponse
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | | [optional]
|
||||
**type** | **str** | | [optional]
|
||||
**message** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.api_response import ApiResponse
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ApiResponse from a JSON string
|
||||
api_response_instance = ApiResponse.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print ApiResponse.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
api_response_dict = api_response_instance.to_dict()
|
||||
# create an instance of ApiResponse from a dict
|
||||
api_response_form_dict = api_response.from_dict(api_response_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# ArrayOfArrayOfModel
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**another_property** | **List[List[Tag]]** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.array_of_array_of_model import ArrayOfArrayOfModel
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ArrayOfArrayOfModel from a JSON string
|
||||
array_of_array_of_model_instance = ArrayOfArrayOfModel.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print ArrayOfArrayOfModel.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
array_of_array_of_model_dict = array_of_array_of_model_instance.to_dict()
|
||||
# create an instance of ArrayOfArrayOfModel from a dict
|
||||
array_of_array_of_model_form_dict = array_of_array_of_model.from_dict(array_of_array_of_model_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# ArrayOfArrayOfNumberOnly
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_array_number** | **List[List[float]]** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ArrayOfArrayOfNumberOnly from a JSON string
|
||||
array_of_array_of_number_only_instance = ArrayOfArrayOfNumberOnly.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print ArrayOfArrayOfNumberOnly.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
array_of_array_of_number_only_dict = array_of_array_of_number_only_instance.to_dict()
|
||||
# create an instance of ArrayOfArrayOfNumberOnly from a dict
|
||||
array_of_array_of_number_only_form_dict = array_of_array_of_number_only.from_dict(array_of_array_of_number_only_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# ArrayOfNumberOnly
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_number** | **List[float]** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.array_of_number_only import ArrayOfNumberOnly
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ArrayOfNumberOnly from a JSON string
|
||||
array_of_number_only_instance = ArrayOfNumberOnly.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print ArrayOfNumberOnly.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
array_of_number_only_dict = array_of_number_only_instance.to_dict()
|
||||
# create an instance of ArrayOfNumberOnly from a dict
|
||||
array_of_number_only_form_dict = array_of_number_only.from_dict(array_of_number_only_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ArrayTest
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_of_string** | **List[str]** | | [optional]
|
||||
**array_array_of_integer** | **List[List[int]]** | | [optional]
|
||||
**array_array_of_model** | **List[List[ReadOnlyFirst]]** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.array_test import ArrayTest
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ArrayTest from a JSON string
|
||||
array_test_instance = ArrayTest.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print ArrayTest.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
array_test_dict = array_test_instance.to_dict()
|
||||
# create an instance of ArrayTest from a dict
|
||||
array_test_form_dict = array_test.from_dict(array_test_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# BasquePig
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **str** | |
|
||||
**color** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.basque_pig import BasquePig
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of BasquePig from a JSON string
|
||||
basque_pig_instance = BasquePig.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print BasquePig.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
basque_pig_dict = basque_pig_instance.to_dict()
|
||||
# create an instance of BasquePig from a dict
|
||||
basque_pig_form_dict = basque_pig.from_dict(basque_pig_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Capitalization
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**small_camel** | **str** | | [optional]
|
||||
**capital_camel** | **str** | | [optional]
|
||||
**small_snake** | **str** | | [optional]
|
||||
**capital_snake** | **str** | | [optional]
|
||||
**sca_eth_flow_points** | **str** | | [optional]
|
||||
**att_name** | **str** | Name of the pet | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.capitalization import Capitalization
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Capitalization from a JSON string
|
||||
capitalization_instance = Capitalization.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Capitalization.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
capitalization_dict = capitalization_instance.to_dict()
|
||||
# create an instance of Capitalization from a dict
|
||||
capitalization_form_dict = capitalization.from_dict(capitalization_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Cat
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **bool** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.cat import Cat
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Cat from a JSON string
|
||||
cat_instance = Cat.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Cat.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
cat_dict = cat_instance.to_dict()
|
||||
# create an instance of Cat from a dict
|
||||
cat_form_dict = cat.from_dict(cat_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Category
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional]
|
||||
**name** | **str** | | [default to 'default-name']
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.category import Category
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Category from a JSON string
|
||||
category_instance = Category.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Category.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
category_dict = category_instance.to_dict()
|
||||
# create an instance of Category from a dict
|
||||
category_form_dict = category.from_dict(category_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# CircularReferenceModel
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**size** | **int** | | [optional]
|
||||
**nested** | [**FirstRef**](FirstRef.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.circular_reference_model import CircularReferenceModel
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of CircularReferenceModel from a JSON string
|
||||
circular_reference_model_instance = CircularReferenceModel.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print CircularReferenceModel.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
circular_reference_model_dict = circular_reference_model_instance.to_dict()
|
||||
# create an instance of CircularReferenceModel from a dict
|
||||
circular_reference_model_form_dict = circular_reference_model.from_dict(circular_reference_model_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# ClassModel
|
||||
|
||||
Model for testing model with \"_class\" property
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**var_class** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.class_model import ClassModel
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ClassModel from a JSON string
|
||||
class_model_instance = ClassModel.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print ClassModel.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
class_model_dict = class_model_instance.to_dict()
|
||||
# create an instance of ClassModel from a dict
|
||||
class_model_form_dict = class_model.from_dict(class_model_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Client
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**client** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.client import Client
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Client from a JSON string
|
||||
client_instance = Client.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Client.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
client_dict = client_instance.to_dict()
|
||||
# create an instance of Client from a dict
|
||||
client_form_dict = client.from_dict(client_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Color
|
||||
|
||||
RGB array, RGBA array, or hex string.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.color import Color
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Color from a JSON string
|
||||
color_instance = Color.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Color.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
color_dict = color_instance.to_dict()
|
||||
# create an instance of Color from a dict
|
||||
color_form_dict = color.from_dict(color_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Creature
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**info** | [**CreatureInfo**](CreatureInfo.md) | |
|
||||
**type** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.creature import Creature
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Creature from a JSON string
|
||||
creature_instance = Creature.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Creature.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
creature_dict = creature_instance.to_dict()
|
||||
# create an instance of Creature from a dict
|
||||
creature_form_dict = creature.from_dict(creature_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# CreatureInfo
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.creature_info import CreatureInfo
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of CreatureInfo from a JSON string
|
||||
creature_info_instance = CreatureInfo.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print CreatureInfo.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
creature_info_dict = creature_info_instance.to_dict()
|
||||
# create an instance of CreatureInfo from a dict
|
||||
creature_info_form_dict = creature_info.from_dict(creature_info_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# DanishPig
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **str** | |
|
||||
**size** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.danish_pig import DanishPig
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DanishPig from a JSON string
|
||||
danish_pig_instance = DanishPig.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print DanishPig.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
danish_pig_dict = danish_pig_instance.to_dict()
|
||||
# create an instance of DanishPig from a dict
|
||||
danish_pig_form_dict = danish_pig.from_dict(danish_pig_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# petstore_api.DefaultApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**foo_get**](DefaultApi.md#foo_get) | **GET** /foo |
|
||||
|
||||
|
||||
# **foo_get**
|
||||
> FooGetDefaultResponse foo_get()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.foo_get_default_response import FooGetDefaultResponse
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.DefaultApi(api_client)
|
||||
|
||||
try:
|
||||
api_response = await api_instance.foo_get()
|
||||
print("The response of DefaultApi->foo_get:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling DefaultApi->foo_get: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**0** | response | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# DeprecatedObject
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.deprecated_object import DeprecatedObject
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DeprecatedObject from a JSON string
|
||||
deprecated_object_instance = DeprecatedObject.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print DeprecatedObject.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
deprecated_object_dict = deprecated_object_instance.to_dict()
|
||||
# create an instance of DeprecatedObject from a dict
|
||||
deprecated_object_form_dict = deprecated_object.from_dict(deprecated_object_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Dog
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.dog import Dog
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Dog from a JSON string
|
||||
dog_instance = Dog.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Dog.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
dog_dict = dog_instance.to_dict()
|
||||
# create an instance of Dog from a dict
|
||||
dog_form_dict = dog.from_dict(dog_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# DummyModel
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**category** | **str** | | [optional]
|
||||
**self_ref** | [**SelfReferenceModel**](SelfReferenceModel.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.dummy_model import DummyModel
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DummyModel from a JSON string
|
||||
dummy_model_instance = DummyModel.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print DummyModel.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
dummy_model_dict = dummy_model_instance.to_dict()
|
||||
# create an instance of DummyModel from a dict
|
||||
dummy_model_form_dict = dummy_model.from_dict(dummy_model_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# EnumArrays
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**just_symbol** | **str** | | [optional]
|
||||
**array_enum** | **List[str]** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.enum_arrays import EnumArrays
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of EnumArrays from a JSON string
|
||||
enum_arrays_instance = EnumArrays.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print EnumArrays.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
enum_arrays_dict = enum_arrays_instance.to_dict()
|
||||
# create an instance of EnumArrays from a dict
|
||||
enum_arrays_form_dict = enum_arrays.from_dict(enum_arrays_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# EnumClass
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# EnumString1
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# EnumString2
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# EnumTest
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enum_string** | **str** | | [optional]
|
||||
**enum_string_required** | **str** | |
|
||||
**enum_integer_default** | **int** | | [optional] [default to 5]
|
||||
**enum_integer** | **int** | | [optional]
|
||||
**enum_number** | **float** | | [optional]
|
||||
**outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional]
|
||||
**outer_enum_integer** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
|
||||
**outer_enum_default_value** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
|
||||
**outer_enum_integer_default_value** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.enum_test import EnumTest
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of EnumTest from a JSON string
|
||||
enum_test_instance = EnumTest.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print EnumTest.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
enum_test_dict = enum_test_instance.to_dict()
|
||||
# create an instance of EnumTest from a dict
|
||||
enum_test_form_dict = enum_test.from_dict(enum_test_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,87 @@
|
||||
# petstore_api.FakeClassnameTags123Api
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**test_classname**](FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
|
||||
|
||||
# **test_classname**
|
||||
> Client test_classname(client)
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (api_key_query):
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.client import Client
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration.api_key['api_key_query'] = os.environ["API_KEY"]
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.FakeClassnameTags123Api(api_client)
|
||||
client = petstore_api.Client() # Client | client model
|
||||
|
||||
try:
|
||||
# To test class name in snake case
|
||||
api_response = await api_instance.test_classname(client)
|
||||
print("The response of FakeClassnameTags123Api->test_classname:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# File
|
||||
|
||||
Must be named `File` for test.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**source_uri** | **str** | Test capitalization | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.file import File
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of File from a JSON string
|
||||
file_instance = File.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print File.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
file_dict = file_instance.to_dict()
|
||||
# create an instance of File from a dict
|
||||
file_form_dict = file.from_dict(file_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# FileSchemaTestClass
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**file** | [**File**](File.md) | | [optional]
|
||||
**files** | [**List[File]**](File.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.file_schema_test_class import FileSchemaTestClass
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of FileSchemaTestClass from a JSON string
|
||||
file_schema_test_class_instance = FileSchemaTestClass.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print FileSchemaTestClass.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
file_schema_test_class_dict = file_schema_test_class_instance.to_dict()
|
||||
# create an instance of FileSchemaTestClass from a dict
|
||||
file_schema_test_class_form_dict = file_schema_test_class.from_dict(file_schema_test_class_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# FirstRef
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**category** | **str** | | [optional]
|
||||
**self_ref** | [**SecondRef**](SecondRef.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.first_ref import FirstRef
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of FirstRef from a JSON string
|
||||
first_ref_instance = FirstRef.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print FirstRef.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
first_ref_dict = first_ref_instance.to_dict()
|
||||
# create an instance of FirstRef from a dict
|
||||
first_ref_form_dict = first_ref.from_dict(first_ref_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Foo
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **str** | | [optional] [default to 'bar']
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.foo import Foo
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Foo from a JSON string
|
||||
foo_instance = Foo.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Foo.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
foo_dict = foo_instance.to_dict()
|
||||
# create an instance of Foo from a dict
|
||||
foo_form_dict = foo.from_dict(foo_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# FooGetDefaultResponse
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**string** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.foo_get_default_response import FooGetDefaultResponse
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of FooGetDefaultResponse from a JSON string
|
||||
foo_get_default_response_instance = FooGetDefaultResponse.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print FooGetDefaultResponse.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
foo_get_default_response_dict = foo_get_default_response_instance.to_dict()
|
||||
# create an instance of FooGetDefaultResponse from a dict
|
||||
foo_get_default_response_form_dict = foo_get_default_response.from_dict(foo_get_default_response_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
# FormatTest
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **int** | | [optional]
|
||||
**int32** | **int** | | [optional]
|
||||
**int64** | **int** | | [optional]
|
||||
**number** | **float** | |
|
||||
**float** | **float** | | [optional]
|
||||
**double** | **float** | | [optional]
|
||||
**decimal** | **decimal.Decimal** | | [optional]
|
||||
**string** | **str** | | [optional]
|
||||
**string_with_double_quote_pattern** | **str** | | [optional]
|
||||
**byte** | **bytearray** | | [optional]
|
||||
**binary** | **bytearray** | | [optional]
|
||||
**var_date** | **date** | |
|
||||
**date_time** | **datetime** | | [optional]
|
||||
**uuid** | **str** | | [optional]
|
||||
**password** | **str** | |
|
||||
**pattern_with_digits** | **str** | A string that is a 10 digit number. Can have leading zeros. | [optional]
|
||||
**pattern_with_digits_and_delimiter** | **str** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.format_test import FormatTest
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of FormatTest from a JSON string
|
||||
format_test_instance = FormatTest.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print FormatTest.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
format_test_dict = format_test_instance.to_dict()
|
||||
# create an instance of FormatTest from a dict
|
||||
format_test_form_dict = format_test.from_dict(format_test_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# HasOnlyReadOnly
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **str** | | [optional] [readonly]
|
||||
**foo** | **str** | | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.has_only_read_only import HasOnlyReadOnly
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of HasOnlyReadOnly from a JSON string
|
||||
has_only_read_only_instance = HasOnlyReadOnly.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print HasOnlyReadOnly.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
has_only_read_only_dict = has_only_read_only_instance.to_dict()
|
||||
# create an instance of HasOnlyReadOnly from a dict
|
||||
has_only_read_only_form_dict = has_only_read_only.from_dict(has_only_read_only_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# HealthCheckResult
|
||||
|
||||
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**nullable_message** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.health_check_result import HealthCheckResult
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of HealthCheckResult from a JSON string
|
||||
health_check_result_instance = HealthCheckResult.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print HealthCheckResult.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
health_check_result_dict = health_check_result_instance.to_dict()
|
||||
# create an instance of HealthCheckResult from a dict
|
||||
health_check_result_form_dict = health_check_result.from_dict(health_check_result_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# InnerDictWithProperty
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**a_property** | **object** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.inner_dict_with_property import InnerDictWithProperty
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of InnerDictWithProperty from a JSON string
|
||||
inner_dict_with_property_instance = InnerDictWithProperty.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print InnerDictWithProperty.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
inner_dict_with_property_dict = inner_dict_with_property_instance.to_dict()
|
||||
# create an instance of InnerDictWithProperty from a dict
|
||||
inner_dict_with_property_form_dict = inner_dict_with_property.from_dict(inner_dict_with_property_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# IntOrString
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.int_or_string import IntOrString
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of IntOrString from a JSON string
|
||||
int_or_string_instance = IntOrString.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print IntOrString.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
int_or_string_dict = int_or_string_instance.to_dict()
|
||||
# create an instance of IntOrString from a dict
|
||||
int_or_string_form_dict = int_or_string.from_dict(int_or_string_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# List
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**var_123_list** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.list import List
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of List from a JSON string
|
||||
list_instance = List.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print List.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
list_dict = list_instance.to_dict()
|
||||
# create an instance of List from a dict
|
||||
list_form_dict = list.from_dict(list_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# MapOfArrayOfModel
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**shop_id_to_org_online_lip_map** | **Dict[str, List[Tag]]** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.map_of_array_of_model import MapOfArrayOfModel
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of MapOfArrayOfModel from a JSON string
|
||||
map_of_array_of_model_instance = MapOfArrayOfModel.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print MapOfArrayOfModel.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
map_of_array_of_model_dict = map_of_array_of_model_instance.to_dict()
|
||||
# create an instance of MapOfArrayOfModel from a dict
|
||||
map_of_array_of_model_form_dict = map_of_array_of_model.from_dict(map_of_array_of_model_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# MapTest
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**map_map_of_string** | **Dict[str, Dict[str, str]]** | | [optional]
|
||||
**map_of_enum_string** | **Dict[str, str]** | | [optional]
|
||||
**direct_map** | **Dict[str, bool]** | | [optional]
|
||||
**indirect_map** | **Dict[str, bool]** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.map_test import MapTest
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of MapTest from a JSON string
|
||||
map_test_instance = MapTest.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print MapTest.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
map_test_dict = map_test_instance.to_dict()
|
||||
# create an instance of MapTest from a dict
|
||||
map_test_form_dict = map_test.from_dict(map_test_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# MixedPropertiesAndAdditionalPropertiesClass
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | **str** | | [optional]
|
||||
**date_time** | **datetime** | | [optional]
|
||||
**map** | [**Dict[str, Animal]**](Animal.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of MixedPropertiesAndAdditionalPropertiesClass from a JSON string
|
||||
mixed_properties_and_additional_properties_class_instance = MixedPropertiesAndAdditionalPropertiesClass.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print MixedPropertiesAndAdditionalPropertiesClass.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
mixed_properties_and_additional_properties_class_dict = mixed_properties_and_additional_properties_class_instance.to_dict()
|
||||
# create an instance of MixedPropertiesAndAdditionalPropertiesClass from a dict
|
||||
mixed_properties_and_additional_properties_class_form_dict = mixed_properties_and_additional_properties_class.from_dict(mixed_properties_and_additional_properties_class_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# Model200Response
|
||||
|
||||
Model for testing model name starting with number
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **int** | | [optional]
|
||||
**var_class** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.model200_response import Model200Response
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Model200Response from a JSON string
|
||||
model200_response_instance = Model200Response.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Model200Response.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
model200_response_dict = model200_response_instance.to_dict()
|
||||
# create an instance of Model200Response from a dict
|
||||
model200_response_form_dict = model200_response.from_dict(model200_response_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# ModelReturn
|
||||
|
||||
Model for testing reserved words
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**var_return** | **int** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.model_return import ModelReturn
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ModelReturn from a JSON string
|
||||
model_return_instance = ModelReturn.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print ModelReturn.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
model_return_dict = model_return_instance.to_dict()
|
||||
# create an instance of ModelReturn from a dict
|
||||
model_return_form_dict = model_return.from_dict(model_return_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Name
|
||||
|
||||
Model for testing model name same as property name
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **int** | |
|
||||
**snake_case** | **int** | | [optional] [readonly]
|
||||
**var_property** | **str** | | [optional]
|
||||
**var_123_number** | **int** | | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.name import Name
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Name from a JSON string
|
||||
name_instance = Name.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Name.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
name_dict = name_instance.to_dict()
|
||||
# create an instance of Name from a dict
|
||||
name_form_dict = name.from_dict(name_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# NullableClass
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**required_integer_prop** | **int** | |
|
||||
**integer_prop** | **int** | | [optional]
|
||||
**number_prop** | **float** | | [optional]
|
||||
**boolean_prop** | **bool** | | [optional]
|
||||
**string_prop** | **str** | | [optional]
|
||||
**date_prop** | **date** | | [optional]
|
||||
**datetime_prop** | **datetime** | | [optional]
|
||||
**array_nullable_prop** | **List[object]** | | [optional]
|
||||
**array_and_items_nullable_prop** | **List[object]** | | [optional]
|
||||
**array_items_nullable** | **List[object]** | | [optional]
|
||||
**object_nullable_prop** | **Dict[str, object]** | | [optional]
|
||||
**object_and_items_nullable_prop** | **Dict[str, object]** | | [optional]
|
||||
**object_items_nullable** | **Dict[str, object]** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.nullable_class import NullableClass
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of NullableClass from a JSON string
|
||||
nullable_class_instance = NullableClass.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print NullableClass.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
nullable_class_dict = nullable_class_instance.to_dict()
|
||||
# create an instance of NullableClass from a dict
|
||||
nullable_class_form_dict = nullable_class.from_dict(nullable_class_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# NullableProperty
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | |
|
||||
**name** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.nullable_property import NullableProperty
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of NullableProperty from a JSON string
|
||||
nullable_property_instance = NullableProperty.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print NullableProperty.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
nullable_property_dict = nullable_property_instance.to_dict()
|
||||
# create an instance of NullableProperty from a dict
|
||||
nullable_property_form_dict = nullable_property.from_dict(nullable_property_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# NumberOnly
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**just_number** | **float** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.number_only import NumberOnly
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of NumberOnly from a JSON string
|
||||
number_only_instance = NumberOnly.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print NumberOnly.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
number_only_dict = number_only_instance.to_dict()
|
||||
# create an instance of NumberOnly from a dict
|
||||
number_only_form_dict = number_only.from_dict(number_only_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# ObjectToTestAdditionalProperties
|
||||
|
||||
Minimal object
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**var_property** | **bool** | Property | [optional] [default to False]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.object_to_test_additional_properties import ObjectToTestAdditionalProperties
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ObjectToTestAdditionalProperties from a JSON string
|
||||
object_to_test_additional_properties_instance = ObjectToTestAdditionalProperties.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print ObjectToTestAdditionalProperties.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
object_to_test_additional_properties_dict = object_to_test_additional_properties_instance.to_dict()
|
||||
# create an instance of ObjectToTestAdditionalProperties from a dict
|
||||
object_to_test_additional_properties_form_dict = object_to_test_additional_properties.from_dict(object_to_test_additional_properties_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# ObjectWithDeprecatedFields
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | **str** | | [optional]
|
||||
**id** | **float** | | [optional]
|
||||
**deprecated_ref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional]
|
||||
**bars** | **List[str]** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.object_with_deprecated_fields import ObjectWithDeprecatedFields
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ObjectWithDeprecatedFields from a JSON string
|
||||
object_with_deprecated_fields_instance = ObjectWithDeprecatedFields.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print ObjectWithDeprecatedFields.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
object_with_deprecated_fields_dict = object_with_deprecated_fields_instance.to_dict()
|
||||
# create an instance of ObjectWithDeprecatedFields from a dict
|
||||
object_with_deprecated_fields_form_dict = object_with_deprecated_fields.from_dict(object_with_deprecated_fields_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# OneOfEnumString
|
||||
|
||||
oneOf enum strings
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.one_of_enum_string import OneOfEnumString
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of OneOfEnumString from a JSON string
|
||||
one_of_enum_string_instance = OneOfEnumString.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print OneOfEnumString.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
one_of_enum_string_dict = one_of_enum_string_instance.to_dict()
|
||||
# create an instance of OneOfEnumString from a dict
|
||||
one_of_enum_string_form_dict = one_of_enum_string.from_dict(one_of_enum_string_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Order
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional]
|
||||
**pet_id** | **int** | | [optional]
|
||||
**quantity** | **int** | | [optional]
|
||||
**ship_date** | **datetime** | | [optional]
|
||||
**status** | **str** | Order Status | [optional]
|
||||
**complete** | **bool** | | [optional] [default to False]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.order import Order
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Order from a JSON string
|
||||
order_instance = Order.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Order.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
order_dict = order_instance.to_dict()
|
||||
# create an instance of Order from a dict
|
||||
order_form_dict = order.from_dict(order_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# OuterComposite
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**my_number** | **float** | | [optional]
|
||||
**my_string** | **str** | | [optional]
|
||||
**my_boolean** | **bool** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.outer_composite import OuterComposite
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of OuterComposite from a JSON string
|
||||
outer_composite_instance = OuterComposite.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print OuterComposite.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
outer_composite_dict = outer_composite_instance.to_dict()
|
||||
# create an instance of OuterComposite from a dict
|
||||
outer_composite_form_dict = outer_composite.from_dict(outer_composite_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OuterEnum
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OuterEnumDefaultValue
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OuterEnumInteger
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OuterEnumIntegerDefaultValue
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# OuterObjectWithEnumProperty
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**str_value** | [**OuterEnum**](OuterEnum.md) | | [optional]
|
||||
**value** | [**OuterEnumInteger**](OuterEnumInteger.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of OuterObjectWithEnumProperty from a JSON string
|
||||
outer_object_with_enum_property_instance = OuterObjectWithEnumProperty.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print OuterObjectWithEnumProperty.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
outer_object_with_enum_property_dict = outer_object_with_enum_property_instance.to_dict()
|
||||
# create an instance of OuterObjectWithEnumProperty from a dict
|
||||
outer_object_with_enum_property_form_dict = outer_object_with_enum_property.from_dict(outer_object_with_enum_property_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Parent
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**optional_dict** | [**Dict[str, InnerDictWithProperty]**](InnerDictWithProperty.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.parent import Parent
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Parent from a JSON string
|
||||
parent_instance = Parent.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Parent.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
parent_dict = parent_instance.to_dict()
|
||||
# create an instance of Parent from a dict
|
||||
parent_form_dict = parent.from_dict(parent_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# ParentWithOptionalDict
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**optional_dict** | [**Dict[str, InnerDictWithProperty]**](InnerDictWithProperty.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.parent_with_optional_dict import ParentWithOptionalDict
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ParentWithOptionalDict from a JSON string
|
||||
parent_with_optional_dict_instance = ParentWithOptionalDict.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print ParentWithOptionalDict.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
parent_with_optional_dict_dict = parent_with_optional_dict_instance.to_dict()
|
||||
# create an instance of ParentWithOptionalDict from a dict
|
||||
parent_with_optional_dict_form_dict = parent_with_optional_dict.from_dict(parent_with_optional_dict_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Pet
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional]
|
||||
**category** | [**Category**](Category.md) | | [optional]
|
||||
**name** | **str** | |
|
||||
**photo_urls** | **List[str]** | |
|
||||
**tags** | [**List[Tag]**](Tag.md) | | [optional]
|
||||
**status** | **str** | pet status in the store | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.pet import Pet
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Pet from a JSON string
|
||||
pet_instance = Pet.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Pet.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
pet_dict = pet_instance.to_dict()
|
||||
# create an instance of Pet from a dict
|
||||
pet_form_dict = pet.from_dict(pet_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,953 @@
|
||||
# petstore_api.PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
|
||||
|
||||
# **add_pet**
|
||||
> add_pet(pet)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* OAuth Authentication (petstore_auth):
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.pet import Pet
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
configuration.access_token = os.environ["ACCESS_TOKEN"]
|
||||
|
||||
# Configure HTTP message signature: http_signature_test
|
||||
# The HTTP Signature Header mechanism that can be used by a client to
|
||||
# authenticate the sender of a message and ensure that particular headers
|
||||
# have not been modified in transit.
|
||||
#
|
||||
# You can specify the signing key-id, private key path, signing scheme,
|
||||
# signing algorithm, list of signed headers and signature max validity.
|
||||
# The 'key_id' parameter is an opaque string that the API server can use
|
||||
# to lookup the client and validate the signature.
|
||||
# The 'private_key_path' parameter should be the path to a file that
|
||||
# contains a DER or base-64 encoded private key.
|
||||
# The 'private_key_passphrase' parameter is optional. Set the passphrase
|
||||
# if the private key is encrypted.
|
||||
# The 'signed_headers' parameter is used to specify the list of
|
||||
# HTTP headers included when generating the signature for the message.
|
||||
# You can specify HTTP headers that you want to protect with a cryptographic
|
||||
# signature. Note that proxies may add, modify or remove HTTP headers
|
||||
# for legitimate reasons, so you should only add headers that you know
|
||||
# will not be modified. For example, if you want to protect the HTTP request
|
||||
# body, you can specify the Digest header. In that case, the client calculates
|
||||
# the digest of the HTTP request body and includes the digest in the message
|
||||
# signature.
|
||||
# The 'signature_max_validity' parameter is optional. It is configured as a
|
||||
# duration to express when the signature ceases to be valid. The client calculates
|
||||
# the expiration date every time it generates the cryptographic signature
|
||||
# of an HTTP request. The API server may have its own security policy
|
||||
# that controls the maximum validity of the signature. The client max validity
|
||||
# must be lower than the server max validity.
|
||||
# The time on the client and server must be synchronized, otherwise the
|
||||
# server may reject the client signature.
|
||||
#
|
||||
# The client must use a combination of private key, signing scheme,
|
||||
# signing algorithm and hash algorithm that matches the security policy of
|
||||
# the API server.
|
||||
#
|
||||
# See petstore_api.signing for a list of all supported parameters.
|
||||
from petstore_api import signing
|
||||
import datetime
|
||||
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
signing_info = petstore_api.HttpSigningConfiguration(
|
||||
key_id = 'my-key-id',
|
||||
private_key_path = 'private_key.pem',
|
||||
private_key_passphrase = 'YOUR_PASSPHRASE',
|
||||
signing_scheme = petstore_api.signing.SCHEME_HS2019,
|
||||
signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3,
|
||||
hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256,
|
||||
signed_headers = [
|
||||
petstore_api.signing.HEADER_REQUEST_TARGET,
|
||||
petstore_api.signing.HEADER_CREATED,
|
||||
petstore_api.signing.HEADER_EXPIRES,
|
||||
petstore_api.signing.HEADER_HOST,
|
||||
petstore_api.signing.HEADER_DATE,
|
||||
petstore_api.signing.HEADER_DIGEST,
|
||||
'Content-Type',
|
||||
'Content-Length',
|
||||
'User-Agent'
|
||||
],
|
||||
signature_max_validity = datetime.timedelta(minutes=5)
|
||||
)
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.PetApi(api_client)
|
||||
pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
|
||||
|
||||
try:
|
||||
# Add a new pet to the store
|
||||
await api_instance.add_pet(pet)
|
||||
except Exception as e:
|
||||
print("Exception when calling PetApi->add_pet: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Successful operation | - |
|
||||
**405** | Invalid input | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **delete_pet**
|
||||
> delete_pet(pet_id, api_key=api_key)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* OAuth Authentication (petstore_auth):
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
configuration.access_token = os.environ["ACCESS_TOKEN"]
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.PetApi(api_client)
|
||||
pet_id = 56 # int | Pet id to delete
|
||||
api_key = 'api_key_example' # str | (optional)
|
||||
|
||||
try:
|
||||
# Deletes a pet
|
||||
await api_instance.delete_pet(pet_id, api_key=api_key)
|
||||
except Exception as e:
|
||||
print("Exception when calling PetApi->delete_pet: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| Pet id to delete |
|
||||
**api_key** | **str**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Successful operation | - |
|
||||
**400** | Invalid pet value | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **find_pets_by_status**
|
||||
> List[Pet] find_pets_by_status(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
|
||||
* OAuth Authentication (petstore_auth):
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.pet import Pet
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
configuration.access_token = os.environ["ACCESS_TOKEN"]
|
||||
|
||||
# Configure HTTP message signature: http_signature_test
|
||||
# The HTTP Signature Header mechanism that can be used by a client to
|
||||
# authenticate the sender of a message and ensure that particular headers
|
||||
# have not been modified in transit.
|
||||
#
|
||||
# You can specify the signing key-id, private key path, signing scheme,
|
||||
# signing algorithm, list of signed headers and signature max validity.
|
||||
# The 'key_id' parameter is an opaque string that the API server can use
|
||||
# to lookup the client and validate the signature.
|
||||
# The 'private_key_path' parameter should be the path to a file that
|
||||
# contains a DER or base-64 encoded private key.
|
||||
# The 'private_key_passphrase' parameter is optional. Set the passphrase
|
||||
# if the private key is encrypted.
|
||||
# The 'signed_headers' parameter is used to specify the list of
|
||||
# HTTP headers included when generating the signature for the message.
|
||||
# You can specify HTTP headers that you want to protect with a cryptographic
|
||||
# signature. Note that proxies may add, modify or remove HTTP headers
|
||||
# for legitimate reasons, so you should only add headers that you know
|
||||
# will not be modified. For example, if you want to protect the HTTP request
|
||||
# body, you can specify the Digest header. In that case, the client calculates
|
||||
# the digest of the HTTP request body and includes the digest in the message
|
||||
# signature.
|
||||
# The 'signature_max_validity' parameter is optional. It is configured as a
|
||||
# duration to express when the signature ceases to be valid. The client calculates
|
||||
# the expiration date every time it generates the cryptographic signature
|
||||
# of an HTTP request. The API server may have its own security policy
|
||||
# that controls the maximum validity of the signature. The client max validity
|
||||
# must be lower than the server max validity.
|
||||
# The time on the client and server must be synchronized, otherwise the
|
||||
# server may reject the client signature.
|
||||
#
|
||||
# The client must use a combination of private key, signing scheme,
|
||||
# signing algorithm and hash algorithm that matches the security policy of
|
||||
# the API server.
|
||||
#
|
||||
# See petstore_api.signing for a list of all supported parameters.
|
||||
from petstore_api import signing
|
||||
import datetime
|
||||
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
signing_info = petstore_api.HttpSigningConfiguration(
|
||||
key_id = 'my-key-id',
|
||||
private_key_path = 'private_key.pem',
|
||||
private_key_passphrase = 'YOUR_PASSPHRASE',
|
||||
signing_scheme = petstore_api.signing.SCHEME_HS2019,
|
||||
signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3,
|
||||
hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256,
|
||||
signed_headers = [
|
||||
petstore_api.signing.HEADER_REQUEST_TARGET,
|
||||
petstore_api.signing.HEADER_CREATED,
|
||||
petstore_api.signing.HEADER_EXPIRES,
|
||||
petstore_api.signing.HEADER_HOST,
|
||||
petstore_api.signing.HEADER_DATE,
|
||||
petstore_api.signing.HEADER_DIGEST,
|
||||
'Content-Type',
|
||||
'Content-Length',
|
||||
'User-Agent'
|
||||
],
|
||||
signature_max_validity = datetime.timedelta(minutes=5)
|
||||
)
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.PetApi(api_client)
|
||||
status = ['status_example'] # List[str] | Status values that need to be considered for filter
|
||||
|
||||
try:
|
||||
# Finds Pets by status
|
||||
api_response = await api_instance.find_pets_by_status(status)
|
||||
print("The response of PetApi->find_pets_by_status:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling PetApi->find_pets_by_status: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List[str]**](str.md)| Status values that need to be considered for filter |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List[Pet]**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | - |
|
||||
**400** | Invalid status value | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **find_pets_by_tags**
|
||||
> List[Pet] find_pets_by_tags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
|
||||
* OAuth Authentication (petstore_auth):
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.pet import Pet
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
configuration.access_token = os.environ["ACCESS_TOKEN"]
|
||||
|
||||
# Configure HTTP message signature: http_signature_test
|
||||
# The HTTP Signature Header mechanism that can be used by a client to
|
||||
# authenticate the sender of a message and ensure that particular headers
|
||||
# have not been modified in transit.
|
||||
#
|
||||
# You can specify the signing key-id, private key path, signing scheme,
|
||||
# signing algorithm, list of signed headers and signature max validity.
|
||||
# The 'key_id' parameter is an opaque string that the API server can use
|
||||
# to lookup the client and validate the signature.
|
||||
# The 'private_key_path' parameter should be the path to a file that
|
||||
# contains a DER or base-64 encoded private key.
|
||||
# The 'private_key_passphrase' parameter is optional. Set the passphrase
|
||||
# if the private key is encrypted.
|
||||
# The 'signed_headers' parameter is used to specify the list of
|
||||
# HTTP headers included when generating the signature for the message.
|
||||
# You can specify HTTP headers that you want to protect with a cryptographic
|
||||
# signature. Note that proxies may add, modify or remove HTTP headers
|
||||
# for legitimate reasons, so you should only add headers that you know
|
||||
# will not be modified. For example, if you want to protect the HTTP request
|
||||
# body, you can specify the Digest header. In that case, the client calculates
|
||||
# the digest of the HTTP request body and includes the digest in the message
|
||||
# signature.
|
||||
# The 'signature_max_validity' parameter is optional. It is configured as a
|
||||
# duration to express when the signature ceases to be valid. The client calculates
|
||||
# the expiration date every time it generates the cryptographic signature
|
||||
# of an HTTP request. The API server may have its own security policy
|
||||
# that controls the maximum validity of the signature. The client max validity
|
||||
# must be lower than the server max validity.
|
||||
# The time on the client and server must be synchronized, otherwise the
|
||||
# server may reject the client signature.
|
||||
#
|
||||
# The client must use a combination of private key, signing scheme,
|
||||
# signing algorithm and hash algorithm that matches the security policy of
|
||||
# the API server.
|
||||
#
|
||||
# See petstore_api.signing for a list of all supported parameters.
|
||||
from petstore_api import signing
|
||||
import datetime
|
||||
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
signing_info = petstore_api.HttpSigningConfiguration(
|
||||
key_id = 'my-key-id',
|
||||
private_key_path = 'private_key.pem',
|
||||
private_key_passphrase = 'YOUR_PASSPHRASE',
|
||||
signing_scheme = petstore_api.signing.SCHEME_HS2019,
|
||||
signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3,
|
||||
hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256,
|
||||
signed_headers = [
|
||||
petstore_api.signing.HEADER_REQUEST_TARGET,
|
||||
petstore_api.signing.HEADER_CREATED,
|
||||
petstore_api.signing.HEADER_EXPIRES,
|
||||
petstore_api.signing.HEADER_HOST,
|
||||
petstore_api.signing.HEADER_DATE,
|
||||
petstore_api.signing.HEADER_DIGEST,
|
||||
'Content-Type',
|
||||
'Content-Length',
|
||||
'User-Agent'
|
||||
],
|
||||
signature_max_validity = datetime.timedelta(minutes=5)
|
||||
)
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.PetApi(api_client)
|
||||
tags = ['tags_example'] # List[str] | Tags to filter by
|
||||
|
||||
try:
|
||||
# Finds Pets by tags
|
||||
api_response = await api_instance.find_pets_by_tags(tags)
|
||||
print("The response of PetApi->find_pets_by_tags:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**List[str]**](str.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List[Pet]**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | - |
|
||||
**400** | Invalid tag value | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_pet_by_id**
|
||||
> Pet get_pet_by_id(pet_id)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (api_key):
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.pet import Pet
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration.api_key['api_key'] = os.environ["API_KEY"]
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.PetApi(api_client)
|
||||
pet_id = 56 # int | ID of pet to return
|
||||
|
||||
try:
|
||||
# Find pet by ID
|
||||
api_response = await api_instance.get_pet_by_id(pet_id)
|
||||
print("The response of PetApi->get_pet_by_id:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling PetApi->get_pet_by_id: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | - |
|
||||
**400** | Invalid ID supplied | - |
|
||||
**404** | Pet not found | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_pet**
|
||||
> update_pet(pet)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* OAuth Authentication (petstore_auth):
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.pet import Pet
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
configuration.access_token = os.environ["ACCESS_TOKEN"]
|
||||
|
||||
# Configure HTTP message signature: http_signature_test
|
||||
# The HTTP Signature Header mechanism that can be used by a client to
|
||||
# authenticate the sender of a message and ensure that particular headers
|
||||
# have not been modified in transit.
|
||||
#
|
||||
# You can specify the signing key-id, private key path, signing scheme,
|
||||
# signing algorithm, list of signed headers and signature max validity.
|
||||
# The 'key_id' parameter is an opaque string that the API server can use
|
||||
# to lookup the client and validate the signature.
|
||||
# The 'private_key_path' parameter should be the path to a file that
|
||||
# contains a DER or base-64 encoded private key.
|
||||
# The 'private_key_passphrase' parameter is optional. Set the passphrase
|
||||
# if the private key is encrypted.
|
||||
# The 'signed_headers' parameter is used to specify the list of
|
||||
# HTTP headers included when generating the signature for the message.
|
||||
# You can specify HTTP headers that you want to protect with a cryptographic
|
||||
# signature. Note that proxies may add, modify or remove HTTP headers
|
||||
# for legitimate reasons, so you should only add headers that you know
|
||||
# will not be modified. For example, if you want to protect the HTTP request
|
||||
# body, you can specify the Digest header. In that case, the client calculates
|
||||
# the digest of the HTTP request body and includes the digest in the message
|
||||
# signature.
|
||||
# The 'signature_max_validity' parameter is optional. It is configured as a
|
||||
# duration to express when the signature ceases to be valid. The client calculates
|
||||
# the expiration date every time it generates the cryptographic signature
|
||||
# of an HTTP request. The API server may have its own security policy
|
||||
# that controls the maximum validity of the signature. The client max validity
|
||||
# must be lower than the server max validity.
|
||||
# The time on the client and server must be synchronized, otherwise the
|
||||
# server may reject the client signature.
|
||||
#
|
||||
# The client must use a combination of private key, signing scheme,
|
||||
# signing algorithm and hash algorithm that matches the security policy of
|
||||
# the API server.
|
||||
#
|
||||
# See petstore_api.signing for a list of all supported parameters.
|
||||
from petstore_api import signing
|
||||
import datetime
|
||||
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
signing_info = petstore_api.HttpSigningConfiguration(
|
||||
key_id = 'my-key-id',
|
||||
private_key_path = 'private_key.pem',
|
||||
private_key_passphrase = 'YOUR_PASSPHRASE',
|
||||
signing_scheme = petstore_api.signing.SCHEME_HS2019,
|
||||
signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3,
|
||||
hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256,
|
||||
signed_headers = [
|
||||
petstore_api.signing.HEADER_REQUEST_TARGET,
|
||||
petstore_api.signing.HEADER_CREATED,
|
||||
petstore_api.signing.HEADER_EXPIRES,
|
||||
petstore_api.signing.HEADER_HOST,
|
||||
petstore_api.signing.HEADER_DATE,
|
||||
petstore_api.signing.HEADER_DIGEST,
|
||||
'Content-Type',
|
||||
'Content-Length',
|
||||
'User-Agent'
|
||||
],
|
||||
signature_max_validity = datetime.timedelta(minutes=5)
|
||||
)
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.PetApi(api_client)
|
||||
pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
|
||||
|
||||
try:
|
||||
# Update an existing pet
|
||||
await api_instance.update_pet(pet)
|
||||
except Exception as e:
|
||||
print("Exception when calling PetApi->update_pet: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Successful operation | - |
|
||||
**400** | Invalid ID supplied | - |
|
||||
**404** | Pet not found | - |
|
||||
**405** | Validation exception | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_pet_with_form**
|
||||
> update_pet_with_form(pet_id, name=name, status=status)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* OAuth Authentication (petstore_auth):
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
configuration.access_token = os.environ["ACCESS_TOKEN"]
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.PetApi(api_client)
|
||||
pet_id = 56 # int | ID of pet that needs to be updated
|
||||
name = 'name_example' # str | Updated name of the pet (optional)
|
||||
status = 'status_example' # str | Updated status of the pet (optional)
|
||||
|
||||
try:
|
||||
# Updates a pet in the store with form data
|
||||
await api_instance.update_pet_with_form(pet_id, name=name, status=status)
|
||||
except Exception as e:
|
||||
print("Exception when calling PetApi->update_pet_with_form: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be updated |
|
||||
**name** | **str**| Updated name of the pet | [optional]
|
||||
**status** | **str**| Updated status of the pet | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Successful operation | - |
|
||||
**405** | Invalid input | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **upload_file**
|
||||
> ApiResponse upload_file(pet_id, additional_metadata=additional_metadata, file=file)
|
||||
|
||||
uploads an image
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* OAuth Authentication (petstore_auth):
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.api_response import ApiResponse
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
configuration.access_token = os.environ["ACCESS_TOKEN"]
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.PetApi(api_client)
|
||||
pet_id = 56 # int | ID of pet to update
|
||||
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
|
||||
file = None # bytearray | file to upload (optional)
|
||||
|
||||
try:
|
||||
# uploads an image
|
||||
api_response = await api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file)
|
||||
print("The response of PetApi->upload_file:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling PetApi->upload_file: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet to update |
|
||||
**additional_metadata** | **str**| Additional data to pass to server | [optional]
|
||||
**file** | **bytearray**| file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **upload_file_with_required_file**
|
||||
> ApiResponse upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* OAuth Authentication (petstore_auth):
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.api_response import ApiResponse
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
configuration.access_token = os.environ["ACCESS_TOKEN"]
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.PetApi(api_client)
|
||||
pet_id = 56 # int | ID of pet to update
|
||||
required_file = None # bytearray | file to upload
|
||||
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
|
||||
|
||||
try:
|
||||
# uploads an image (required)
|
||||
api_response = await api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata)
|
||||
print("The response of PetApi->upload_file_with_required_file:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet to update |
|
||||
**required_file** | **bytearray**| file to upload |
|
||||
**additional_metadata** | **str**| Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# Pig
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **str** | |
|
||||
**color** | **str** | |
|
||||
**size** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.pig import Pig
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Pig from a JSON string
|
||||
pig_instance = Pig.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Pig.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
pig_dict = pig_instance.to_dict()
|
||||
# create an instance of Pig from a dict
|
||||
pig_form_dict = pig.from_dict(pig_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# PropertyNameCollision
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**type** | **str** | | [optional]
|
||||
**type** | **str** | | [optional]
|
||||
**type_** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.property_name_collision import PropertyNameCollision
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of PropertyNameCollision from a JSON string
|
||||
property_name_collision_instance = PropertyNameCollision.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print PropertyNameCollision.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
property_name_collision_dict = property_name_collision_instance.to_dict()
|
||||
# create an instance of PropertyNameCollision from a dict
|
||||
property_name_collision_form_dict = property_name_collision.from_dict(property_name_collision_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# ReadOnlyFirst
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **str** | | [optional] [readonly]
|
||||
**baz** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.read_only_first import ReadOnlyFirst
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReadOnlyFirst from a JSON string
|
||||
read_only_first_instance = ReadOnlyFirst.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print ReadOnlyFirst.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
read_only_first_dict = read_only_first_instance.to_dict()
|
||||
# create an instance of ReadOnlyFirst from a dict
|
||||
read_only_first_form_dict = read_only_first.from_dict(read_only_first_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# SecondRef
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**category** | **str** | | [optional]
|
||||
**circular_ref** | [**CircularReferenceModel**](CircularReferenceModel.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.second_ref import SecondRef
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of SecondRef from a JSON string
|
||||
second_ref_instance = SecondRef.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print SecondRef.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
second_ref_dict = second_ref_instance.to_dict()
|
||||
# create an instance of SecondRef from a dict
|
||||
second_ref_form_dict = second_ref.from_dict(second_ref_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# SelfReferenceModel
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**size** | **int** | | [optional]
|
||||
**nested** | [**DummyModel**](DummyModel.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.self_reference_model import SelfReferenceModel
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of SelfReferenceModel from a JSON string
|
||||
self_reference_model_instance = SelfReferenceModel.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print SelfReferenceModel.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
self_reference_model_dict = self_reference_model_instance.to_dict()
|
||||
# create an instance of SelfReferenceModel from a dict
|
||||
self_reference_model_form_dict = self_reference_model.from_dict(self_reference_model_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# SingleRefType
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# SpecialCharacterEnum
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# SpecialModelName
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**special_property_name** | **int** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.special_model_name import SpecialModelName
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of SpecialModelName from a JSON string
|
||||
special_model_name_instance = SpecialModelName.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print SpecialModelName.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
special_model_name_dict = special_model_name_instance.to_dict()
|
||||
# create an instance of SpecialModelName from a dict
|
||||
special_model_name_form_dict = special_model_name.from_dict(special_model_name_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# SpecialName
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**var_property** | **int** | | [optional]
|
||||
**var_async** | [**Category**](Category.md) | | [optional]
|
||||
**var_schema** | **str** | pet status in the store | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.special_name import SpecialName
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of SpecialName from a JSON string
|
||||
special_name_instance = SpecialName.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print SpecialName.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
special_name_dict = special_name_instance.to_dict()
|
||||
# create an instance of SpecialName from a dict
|
||||
special_name_form_dict = special_name.from_dict(special_name_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
# petstore_api.StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
# **delete_order**
|
||||
> delete_order(order_id)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.StoreApi(api_client)
|
||||
order_id = 'order_id_example' # str | ID of the order that needs to be deleted
|
||||
|
||||
try:
|
||||
# Delete purchase order by ID
|
||||
await api_instance.delete_order(order_id)
|
||||
except Exception as e:
|
||||
print("Exception when calling StoreApi->delete_order: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order_id** | **str**| ID of the order that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**400** | Invalid ID supplied | - |
|
||||
**404** | Order not found | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_inventory**
|
||||
> Dict[str, int] get_inventory()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (api_key):
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration.api_key['api_key'] = os.environ["API_KEY"]
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.StoreApi(api_client)
|
||||
|
||||
try:
|
||||
# Returns pet inventories by status
|
||||
api_response = await api_instance.get_inventory()
|
||||
print("The response of StoreApi->get_inventory:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling StoreApi->get_inventory: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Dict[str, int]**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_order_by_id**
|
||||
> Order get_order_by_id(order_id)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.order import Order
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.StoreApi(api_client)
|
||||
order_id = 56 # int | ID of pet that needs to be fetched
|
||||
|
||||
try:
|
||||
# Find purchase order by ID
|
||||
api_response = await api_instance.get_order_by_id(order_id)
|
||||
print("The response of StoreApi->get_order_by_id:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling StoreApi->get_order_by_id: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | - |
|
||||
**400** | Invalid ID supplied | - |
|
||||
**404** | Order not found | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **place_order**
|
||||
> Order place_order(order)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.order import Order
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.StoreApi(api_client)
|
||||
order = petstore_api.Order() # Order | order placed for purchasing the pet
|
||||
|
||||
try:
|
||||
# Place an order for a pet
|
||||
api_response = await api_instance.place_order(order)
|
||||
print("The response of StoreApi->place_order:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling StoreApi->place_order: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | - |
|
||||
**400** | Invalid Order | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Tag
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional]
|
||||
**name** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.tag import Tag
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Tag from a JSON string
|
||||
tag_instance = Tag.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Tag.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
tag_dict = tag_instance.to_dict()
|
||||
# create an instance of Tag from a dict
|
||||
tag_form_dict = tag.from_dict(tag_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**some_property** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of TestInlineFreeformAdditionalPropertiesRequest from a JSON string
|
||||
test_inline_freeform_additional_properties_request_instance = TestInlineFreeformAdditionalPropertiesRequest.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print TestInlineFreeformAdditionalPropertiesRequest.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
test_inline_freeform_additional_properties_request_dict = test_inline_freeform_additional_properties_request_instance.to_dict()
|
||||
# create an instance of TestInlineFreeformAdditionalPropertiesRequest from a dict
|
||||
test_inline_freeform_additional_properties_request_form_dict = test_inline_freeform_additional_properties_request.from_dict(test_inline_freeform_additional_properties_request_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Tiger
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**skill** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.tiger import Tiger
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Tiger from a JSON string
|
||||
tiger_instance = Tiger.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Tiger.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
tiger_dict = tiger_instance.to_dict()
|
||||
# create an instance of Tiger from a dict
|
||||
tiger_form_dict = tiger.from_dict(tiger_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# User
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional]
|
||||
**username** | **str** | | [optional]
|
||||
**first_name** | **str** | | [optional]
|
||||
**last_name** | **str** | | [optional]
|
||||
**email** | **str** | | [optional]
|
||||
**password** | **str** | | [optional]
|
||||
**phone** | **str** | | [optional]
|
||||
**user_status** | **int** | User Status | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.user import User
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of User from a JSON string
|
||||
user_instance = User.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print User.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
user_dict = user_instance.to_dict()
|
||||
# create an instance of User from a dict
|
||||
user_form_dict = user.from_dict(user_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,542 @@
|
||||
# petstore_api.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**create_user**](UserApi.md#create_user) | **POST** /user | Create user
|
||||
[**create_users_with_array_input**](UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**create_users_with_list_input**](UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**delete_user**](UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
|
||||
[**get_user_by_name**](UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
|
||||
[**login_user**](UserApi.md#login_user) | **GET** /user/login | Logs user into the system
|
||||
[**logout_user**](UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**update_user**](UserApi.md#update_user) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
# **create_user**
|
||||
> create_user(user)
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.user import User
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.UserApi(api_client)
|
||||
user = petstore_api.User() # User | Created user object
|
||||
|
||||
try:
|
||||
# Create user
|
||||
await api_instance.create_user(user)
|
||||
except Exception as e:
|
||||
print("Exception when calling UserApi->create_user: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**0** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **create_users_with_array_input**
|
||||
> create_users_with_array_input(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.user import User
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.UserApi(api_client)
|
||||
user = [petstore_api.User()] # List[User] | List of user object
|
||||
|
||||
try:
|
||||
# Creates list of users with given input array
|
||||
await api_instance.create_users_with_array_input(user)
|
||||
except Exception as e:
|
||||
print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**List[User]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**0** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **create_users_with_list_input**
|
||||
> create_users_with_list_input(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.user import User
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.UserApi(api_client)
|
||||
user = [petstore_api.User()] # List[User] | List of user object
|
||||
|
||||
try:
|
||||
# Creates list of users with given input array
|
||||
await api_instance.create_users_with_list_input(user)
|
||||
except Exception as e:
|
||||
print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**List[User]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**0** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **delete_user**
|
||||
> delete_user(username)
|
||||
|
||||
Delete user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.UserApi(api_client)
|
||||
username = 'username_example' # str | The name that needs to be deleted
|
||||
|
||||
try:
|
||||
# Delete user
|
||||
await api_instance.delete_user(username)
|
||||
except Exception as e:
|
||||
print("Exception when calling UserApi->delete_user: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **str**| The name that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**400** | Invalid username supplied | - |
|
||||
**404** | User not found | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_user_by_name**
|
||||
> User get_user_by_name(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.user import User
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.UserApi(api_client)
|
||||
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
try:
|
||||
# Get user by user name
|
||||
api_response = await api_instance.get_user_by_name(username)
|
||||
print("The response of UserApi->get_user_by_name:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling UserApi->get_user_by_name: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **str**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | - |
|
||||
**400** | Invalid username supplied | - |
|
||||
**404** | User not found | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **login_user**
|
||||
> str login_user(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.UserApi(api_client)
|
||||
username = 'username_example' # str | The user name for login
|
||||
password = 'password_example' # str | The password for login in clear text
|
||||
|
||||
try:
|
||||
# Logs user into the system
|
||||
api_response = await api_instance.login_user(username, password)
|
||||
print("The response of UserApi->login_user:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling UserApi->login_user: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **str**| The user name for login |
|
||||
**password** | **str**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
**str**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> |
|
||||
**400** | Invalid username/password supplied | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **logout_user**
|
||||
> logout_user()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.UserApi(api_client)
|
||||
|
||||
try:
|
||||
# Logs out current logged in user session
|
||||
await api_instance.logout_user()
|
||||
except Exception as e:
|
||||
print("Exception when calling UserApi->logout_user: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**0** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_user**
|
||||
> update_user(username, user)
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import petstore_api
|
||||
from petstore_api.models.user import User
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
async with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = petstore_api.UserApi(api_client)
|
||||
username = 'username_example' # str | name that need to be deleted
|
||||
user = petstore_api.User() # User | Updated user object
|
||||
|
||||
try:
|
||||
# Updated user
|
||||
await api_instance.update_user(username, user)
|
||||
except Exception as e:
|
||||
print("Exception when calling UserApi->update_user: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **str**| name that need to be deleted |
|
||||
**user** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**400** | Invalid user supplied | - |
|
||||
**404** | User not found | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# WithNestedOneOf
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**size** | **int** | | [optional]
|
||||
**nested_pig** | [**Pig**](Pig.md) | | [optional]
|
||||
**nested_oneof_enum_string** | [**OneOfEnumString**](OneOfEnumString.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.with_nested_one_of import WithNestedOneOf
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of WithNestedOneOf from a JSON string
|
||||
with_nested_one_of_instance = WithNestedOneOf.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print WithNestedOneOf.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
with_nested_one_of_dict = with_nested_one_of_instance.to_dict()
|
||||
# create an instance of WithNestedOneOf from a dict
|
||||
with_nested_one_of_form_dict = with_nested_one_of.from_dict(with_nested_one_of_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=$(git remote)
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
@@ -0,0 +1,119 @@
|
||||
# coding: utf-8
|
||||
|
||||
# flake8: noqa
|
||||
|
||||
"""
|
||||
OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
__version__ = "1.0.0"
|
||||
|
||||
# import apis into sdk package
|
||||
from petstore_api.api.another_fake_api import AnotherFakeApi
|
||||
from petstore_api.api.default_api import DefaultApi
|
||||
from petstore_api.api.fake_api import FakeApi
|
||||
from petstore_api.api.fake_classname_tags123_api import FakeClassnameTags123Api
|
||||
from petstore_api.api.pet_api import PetApi
|
||||
from petstore_api.api.store_api import StoreApi
|
||||
from petstore_api.api.user_api import UserApi
|
||||
|
||||
# import ApiClient
|
||||
from petstore_api.api_response import ApiResponse
|
||||
from petstore_api.api_client import ApiClient
|
||||
from petstore_api.configuration import Configuration
|
||||
from petstore_api.exceptions import OpenApiException
|
||||
from petstore_api.exceptions import ApiTypeError
|
||||
from petstore_api.exceptions import ApiValueError
|
||||
from petstore_api.exceptions import ApiKeyError
|
||||
from petstore_api.exceptions import ApiAttributeError
|
||||
from petstore_api.exceptions import ApiException
|
||||
from petstore_api.signing import HttpSigningConfiguration
|
||||
|
||||
# import models into sdk package
|
||||
from petstore_api.models.additional_properties_any_type import AdditionalPropertiesAnyType
|
||||
from petstore_api.models.additional_properties_class import AdditionalPropertiesClass
|
||||
from petstore_api.models.additional_properties_object import AdditionalPropertiesObject
|
||||
from petstore_api.models.additional_properties_with_description_only import AdditionalPropertiesWithDescriptionOnly
|
||||
from petstore_api.models.all_of_with_single_ref import AllOfWithSingleRef
|
||||
from petstore_api.models.animal import Animal
|
||||
from petstore_api.models.any_of_color import AnyOfColor
|
||||
from petstore_api.models.any_of_pig import AnyOfPig
|
||||
from petstore_api.models.api_response import ApiResponse
|
||||
from petstore_api.models.array_of_array_of_model import ArrayOfArrayOfModel
|
||||
from petstore_api.models.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly
|
||||
from petstore_api.models.array_of_number_only import ArrayOfNumberOnly
|
||||
from petstore_api.models.array_test import ArrayTest
|
||||
from petstore_api.models.basque_pig import BasquePig
|
||||
from petstore_api.models.capitalization import Capitalization
|
||||
from petstore_api.models.cat import Cat
|
||||
from petstore_api.models.category import Category
|
||||
from petstore_api.models.circular_reference_model import CircularReferenceModel
|
||||
from petstore_api.models.class_model import ClassModel
|
||||
from petstore_api.models.client import Client
|
||||
from petstore_api.models.color import Color
|
||||
from petstore_api.models.creature import Creature
|
||||
from petstore_api.models.creature_info import CreatureInfo
|
||||
from petstore_api.models.danish_pig import DanishPig
|
||||
from petstore_api.models.deprecated_object import DeprecatedObject
|
||||
from petstore_api.models.dog import Dog
|
||||
from petstore_api.models.dummy_model import DummyModel
|
||||
from petstore_api.models.enum_arrays import EnumArrays
|
||||
from petstore_api.models.enum_class import EnumClass
|
||||
from petstore_api.models.enum_string1 import EnumString1
|
||||
from petstore_api.models.enum_string2 import EnumString2
|
||||
from petstore_api.models.enum_test import EnumTest
|
||||
from petstore_api.models.file import File
|
||||
from petstore_api.models.file_schema_test_class import FileSchemaTestClass
|
||||
from petstore_api.models.first_ref import FirstRef
|
||||
from petstore_api.models.foo import Foo
|
||||
from petstore_api.models.foo_get_default_response import FooGetDefaultResponse
|
||||
from petstore_api.models.format_test import FormatTest
|
||||
from petstore_api.models.has_only_read_only import HasOnlyReadOnly
|
||||
from petstore_api.models.health_check_result import HealthCheckResult
|
||||
from petstore_api.models.inner_dict_with_property import InnerDictWithProperty
|
||||
from petstore_api.models.int_or_string import IntOrString
|
||||
from petstore_api.models.list import List
|
||||
from petstore_api.models.map_of_array_of_model import MapOfArrayOfModel
|
||||
from petstore_api.models.map_test import MapTest
|
||||
from petstore_api.models.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass
|
||||
from petstore_api.models.model200_response import Model200Response
|
||||
from petstore_api.models.model_return import ModelReturn
|
||||
from petstore_api.models.name import Name
|
||||
from petstore_api.models.nullable_class import NullableClass
|
||||
from petstore_api.models.nullable_property import NullableProperty
|
||||
from petstore_api.models.number_only import NumberOnly
|
||||
from petstore_api.models.object_to_test_additional_properties import ObjectToTestAdditionalProperties
|
||||
from petstore_api.models.object_with_deprecated_fields import ObjectWithDeprecatedFields
|
||||
from petstore_api.models.one_of_enum_string import OneOfEnumString
|
||||
from petstore_api.models.order import Order
|
||||
from petstore_api.models.outer_composite import OuterComposite
|
||||
from petstore_api.models.outer_enum import OuterEnum
|
||||
from petstore_api.models.outer_enum_default_value import OuterEnumDefaultValue
|
||||
from petstore_api.models.outer_enum_integer import OuterEnumInteger
|
||||
from petstore_api.models.outer_enum_integer_default_value import OuterEnumIntegerDefaultValue
|
||||
from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty
|
||||
from petstore_api.models.parent import Parent
|
||||
from petstore_api.models.parent_with_optional_dict import ParentWithOptionalDict
|
||||
from petstore_api.models.pet import Pet
|
||||
from petstore_api.models.pig import Pig
|
||||
from petstore_api.models.property_name_collision import PropertyNameCollision
|
||||
from petstore_api.models.read_only_first import ReadOnlyFirst
|
||||
from petstore_api.models.second_ref import SecondRef
|
||||
from petstore_api.models.self_reference_model import SelfReferenceModel
|
||||
from petstore_api.models.single_ref_type import SingleRefType
|
||||
from petstore_api.models.special_character_enum import SpecialCharacterEnum
|
||||
from petstore_api.models.special_model_name import SpecialModelName
|
||||
from petstore_api.models.special_name import SpecialName
|
||||
from petstore_api.models.tag import Tag
|
||||
from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest
|
||||
from petstore_api.models.tiger import Tiger
|
||||
from petstore_api.models.user import User
|
||||
from petstore_api.models.with_nested_one_of import WithNestedOneOf
|
||||
@@ -0,0 +1,11 @@
|
||||
# flake8: noqa
|
||||
|
||||
# import apis into api package
|
||||
from petstore_api.api.another_fake_api import AnotherFakeApi
|
||||
from petstore_api.api.default_api import DefaultApi
|
||||
from petstore_api.api.fake_api import FakeApi
|
||||
from petstore_api.api.fake_classname_tags123_api import FakeClassnameTags123Api
|
||||
from petstore_api.api.pet_api import PetApi
|
||||
from petstore_api.api.store_api import StoreApi
|
||||
from petstore_api.api.user_api import UserApi
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import re # noqa: F401
|
||||
import io
|
||||
import warnings
|
||||
|
||||
from pydantic import validate_arguments, ValidationError
|
||||
from typing import overload, Optional, Union, Awaitable
|
||||
|
||||
from typing_extensions import Annotated
|
||||
from pydantic import Field
|
||||
|
||||
from petstore_api.models.client import Client
|
||||
|
||||
from petstore_api.api_client import ApiClient
|
||||
from petstore_api.api_response import ApiResponse
|
||||
from petstore_api.exceptions import ( # noqa: F401
|
||||
ApiTypeError,
|
||||
ApiValueError
|
||||
)
|
||||
|
||||
|
||||
class AnotherFakeApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
|
||||
@validate_arguments
|
||||
async def call_123_test_special_tags(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> Client: # noqa: E501
|
||||
"""To test special tags # noqa: E501
|
||||
|
||||
To test special tags and operation ID starting with number # noqa: E501
|
||||
|
||||
:param client: client model (required)
|
||||
:type client: Client
|
||||
: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.
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
:rtype: Client
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the call_123_test_special_tags_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return await self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
async def call_123_test_special_tags_with_http_info(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> ApiResponse: # noqa: E501
|
||||
"""To test special tags # noqa: E501
|
||||
|
||||
To test special tags and operation ID starting with number # noqa: E501
|
||||
|
||||
:param client: client model (required)
|
||||
:type client: Client
|
||||
:param _preload_content: if False, the ApiResponse.data will
|
||||
be set to none and raw_data will store the
|
||||
HTTP response body without reading/decoding.
|
||||
Default is True.
|
||||
:type _preload_content: bool, optional
|
||||
:param _return_http_data_only: response data instead of ApiResponse
|
||||
object with status code, headers, etc
|
||||
:type _return_http_data_only: bool, optional
|
||||
: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.
|
||||
: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
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
:rtype: tuple(Client, status_code(int), headers(HTTPHeaderDict))
|
||||
"""
|
||||
|
||||
_params = locals()
|
||||
|
||||
_all_params = [
|
||||
'client'
|
||||
]
|
||||
_all_params.extend(
|
||||
[
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth',
|
||||
'_content_type',
|
||||
'_headers'
|
||||
]
|
||||
)
|
||||
|
||||
# validate the arguments
|
||||
for _key, _val in _params['kwargs'].items():
|
||||
if _key not in _all_params:
|
||||
raise ApiTypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method call_123_test_special_tags" % _key
|
||||
)
|
||||
_params[_key] = _val
|
||||
del _params['kwargs']
|
||||
|
||||
_collection_formats = {}
|
||||
|
||||
# process the path parameters
|
||||
_path_params = {}
|
||||
|
||||
# process the query parameters
|
||||
_query_params = []
|
||||
# process the header parameters
|
||||
_header_params = dict(_params.get('_headers', {}))
|
||||
# process the form parameters
|
||||
_form_params = []
|
||||
_files = {}
|
||||
# process the body parameter
|
||||
_body_params = None
|
||||
if _params['client'] is not None:
|
||||
_body_params = _params['client']
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# set the HTTP header `Content-Type`
|
||||
_content_types_list = _params.get('_content_type',
|
||||
self.api_client.select_header_content_type(
|
||||
['application/json']))
|
||||
if _content_types_list:
|
||||
_header_params['Content-Type'] = _content_types_list
|
||||
|
||||
# authentication setting
|
||||
_auth_settings = [] # noqa: E501
|
||||
|
||||
_response_types_map = {
|
||||
'200': "Client",
|
||||
}
|
||||
|
||||
return await self.api_client.call_api(
|
||||
'/another-fake/dummy', 'PATCH',
|
||||
_path_params,
|
||||
_query_params,
|
||||
_header_params,
|
||||
body=_body_params,
|
||||
post_params=_form_params,
|
||||
files=_files,
|
||||
response_types_map=_response_types_map,
|
||||
auth_settings=_auth_settings,
|
||||
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
||||
_preload_content=_params.get('_preload_content', True),
|
||||
_request_timeout=_params.get('_request_timeout'),
|
||||
collection_formats=_collection_formats,
|
||||
_request_auth=_params.get('_request_auth'))
|
||||
@@ -0,0 +1,155 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import re # noqa: F401
|
||||
import io
|
||||
import warnings
|
||||
|
||||
from pydantic import validate_arguments, ValidationError
|
||||
from typing import overload, Optional, Union, Awaitable
|
||||
|
||||
from petstore_api.models.foo_get_default_response import FooGetDefaultResponse
|
||||
|
||||
from petstore_api.api_client import ApiClient
|
||||
from petstore_api.api_response import ApiResponse
|
||||
from petstore_api.exceptions import ( # noqa: F401
|
||||
ApiTypeError,
|
||||
ApiValueError
|
||||
)
|
||||
|
||||
|
||||
class DefaultApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
|
||||
@validate_arguments
|
||||
async def foo_get(self, **kwargs) -> FooGetDefaultResponse: # noqa: E501
|
||||
"""foo_get # noqa: E501
|
||||
|
||||
|
||||
: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.
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
:rtype: FooGetDefaultResponse
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the foo_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return await self.foo_get_with_http_info(**kwargs) # noqa: E501
|
||||
|
||||
@validate_arguments
|
||||
async def foo_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
|
||||
"""foo_get # noqa: E501
|
||||
|
||||
|
||||
:param _preload_content: if False, the ApiResponse.data will
|
||||
be set to none and raw_data will store the
|
||||
HTTP response body without reading/decoding.
|
||||
Default is True.
|
||||
:type _preload_content: bool, optional
|
||||
:param _return_http_data_only: response data instead of ApiResponse
|
||||
object with status code, headers, etc
|
||||
:type _return_http_data_only: bool, optional
|
||||
: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.
|
||||
: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
|
||||
:type _content_type: string, optional: force content-type for the request
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
:rtype: tuple(FooGetDefaultResponse, status_code(int), headers(HTTPHeaderDict))
|
||||
"""
|
||||
|
||||
_params = locals()
|
||||
|
||||
_all_params = [
|
||||
]
|
||||
_all_params.extend(
|
||||
[
|
||||
'_return_http_data_only',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_request_auth',
|
||||
'_content_type',
|
||||
'_headers'
|
||||
]
|
||||
)
|
||||
|
||||
# validate the arguments
|
||||
for _key, _val in _params['kwargs'].items():
|
||||
if _key not in _all_params:
|
||||
raise ApiTypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method foo_get" % _key
|
||||
)
|
||||
_params[_key] = _val
|
||||
del _params['kwargs']
|
||||
|
||||
_collection_formats = {}
|
||||
|
||||
# process the path parameters
|
||||
_path_params = {}
|
||||
|
||||
# process the query parameters
|
||||
_query_params = []
|
||||
# process the header parameters
|
||||
_header_params = dict(_params.get('_headers', {}))
|
||||
# process the form parameters
|
||||
_form_params = []
|
||||
_files = {}
|
||||
# process the body parameter
|
||||
_body_params = None
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# authentication setting
|
||||
_auth_settings = [] # noqa: E501
|
||||
|
||||
_response_types_map = {
|
||||
}
|
||||
|
||||
return await self.api_client.call_api(
|
||||
'/foo', 'GET',
|
||||
_path_params,
|
||||
_query_params,
|
||||
_header_params,
|
||||
body=_body_params,
|
||||
post_params=_form_params,
|
||||
files=_files,
|
||||
response_types_map=_response_types_map,
|
||||
auth_settings=_auth_settings,
|
||||
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
||||
_preload_content=_params.get('_preload_content', True),
|
||||
_request_timeout=_params.get('_request_timeout'),
|
||||
collection_formats=_collection_formats,
|
||||
_request_auth=_params.get('_request_auth'))
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user