Files
openapi-generator/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md
Justin Black 68fb5a96c5 [python-experimental] consolidates endpoints into paths module (#13007)
* Adds endpoint creation in path modules

* REgens samples

* Adds BaseApi so there can be 2 class interfaces for http method and operationid

* Adds paths init

* Adds enum containing paths

* Uses path enum for endpoint paths

* Adds camel case to undersce converstion in to ineum var name

* Fixes path enum generation

* Moves path api combination module into apis

* Moves tag apis into a tags module

* Adds path_to_api

* Changes module path to paths

* Fixes tag api imports

* Fixes self type in endpoint methods

* Adds test changes

* Adds tag enum

* Adds tag_to_api

* Adds missing tag

* Fixes self types in endpoint methods

* Refactors java endpoint generation to be simpler

* Further refactors generateEndpoints

* Generates one test file per endpoint

* Updates v3 samples

* Fixes endpoint tests, all tests passing now

* Samples regenerated

* Fixes petstore tests

* Generates separate endpoint test methods on each endpoint

* Fixes api docs and enum string values in those docs

* Regenerates samples

* Removes pass to fix tests
2022-08-01 11:22:35 -07:00

3.5 KiB

petstore_api.AnotherFakeApi

All URIs are relative to http://petstore.swagger.io:80/v2

Method HTTP request Description
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

import petstore_api
from petstore_api.apis.tags import another_fake_api
from petstore_api.model.client import Client
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
with petstore_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = another_fake_api.AnotherFakeApi(api_client)

    # example passing only required values which don't have defaults set
    body = Client(
        client="client_example",
    )
    try:
        # To test special tags
        api_response = api_instance.call_123_test_special_tags(
            body=body,
        )
        pprint(api_response)
    except petstore_api.ApiException as e:
        print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)

Parameters

Name Type Description Notes
body typing.Union[SchemaForRequestBodyApplicationJson] required
content_type str optional, default is 'application/json' Selects the schema and serialization of the request body
accept_content_types typing.Tuple[str] default is ('application/json', ) Tells the server the content type(s) that are accepted by the client
stream bool default is False if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout typing.Optional[typing.Union[int, typing.Tuple]] default is None the timeout used by the rest client
skip_deserialization bool default is False when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned

body

SchemaForRequestBodyApplicationJson

Type Description Notes
Client

Return Types, Responses

Code Class Description
n/a api_client.ApiResponseWithoutDeserialization When skip_deserialization is True this response is returned
200 ApiResponseFor200 successful operation

ApiResponseFor200

Name Type Description Notes
response urllib3.HTTPResponse Raw response
body typing.Union[SchemaFor200ResponseBodyApplicationJson, ]
headers Unset headers were not defined

SchemaFor200ResponseBodyApplicationJson

Type Description Notes
Client

Client

Authorization

No authorization required

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