Skip to content

Latest commit

 

History

History
116 lines (96 loc) · 5.07 KB

File metadata and controls

116 lines (96 loc) · 5.07 KB

petstore_api.paths.another_fake_dummy.operation

Operation Method Name

Method Name Api Class Notes
call_123_test__special_tags AnotherFakeApi This api is only for tag=$another-fake?
patch ApiForPatch This api is only for this endpoint
patch AnotherFakeDummy This api is only for path=/another-fake/dummy

Table of Contents

General Info

Field Value
Summary To test special tags
Description To test special tags and operation ID starting with number
Path "/another-fake/dummy"
HTTP Method patch

Arguments

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

Return Types

HTTP Status Code Class Description
n/a api_response.ApiResponseWithoutDeserialization When skip_deserialization is True this response is returned
200 ResponseFor200.ApiResponse successful operation

ResponseFor200

Description

successful operation

ResponseFor200 ApiResponse

Name Type Description Notes
response urllib3.HTTPResponse Raw response
body client.ClientDict
headers Unset headers were not defined

ResponseFor200 Body

Content-Type Schema
"application/json" content.application_json.Schema

Body Details

ResponseFor200 content ApplicationJson Schema

type: schemas.Schema
Ref Schema Info
Ref Schema Input Type Output Type
client.Client client.ClientDictInput, client.ClientDict client.ClientDict

Servers

Set the available servers by defining your used servers in ApiConfiguration.server_info Then select your server by setting a server index in ApiConfiguration.server_index_info or by passing server_index in to the endpoint method.

server_index Class Description
0 Server0 petstore server
1 Server1 The local server
2 Server2 staging server with no variables

Code Sample

import petstore_api
from petstore_api.configurations import api_configuration
from petstore_api.apis.tags import another_fake_api
from pprint import pprint
used_configuration = api_configuration.ApiConfiguration(
)
# Enter a context with an instance of the API client
with petstore_api.ApiClient(used_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.validate({
        "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)

[Back to top] [Back to AnotherFakeApi API] [Back to Endpoints] [Back to README]