Files
openapi-generator/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.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

2.4 KiB

petstore_api.DefaultApi

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

Method HTTP request Description
foo_get get /foo

foo_get

{str: (bool, date, datetime, dict, float, int, list, str, none_type)} foo_get()

Example

import petstore_api
from petstore_api.apis.tags import default_api
from petstore_api.model.foo import Foo
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 = default_api.DefaultApi(api_client)

    # example, this endpoint has no required or optional parameters
    try:
        api_response = api_instance.foo_get()
        pprint(api_response)
    except petstore_api.ApiException as e:
        print("Exception when calling DefaultApi->foo_get: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return Types, Responses

Code Class Description
n/a api_client.ApiResponseWithoutDeserialization When skip_deserialization is True this response is returned
default ApiResponseForDefault response

ApiResponseForDefault

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

SchemaFor0ResponseBodyApplicationJson

Properties

Name Type Description Notes
string Foo [optional]
any string name bool, date, datetime, dict, float, int, list, str, none_type any string name can be used but the value must be the correct type [optional]

{str: (bool, date, datetime, dict, float, int, list, str, none_type)}

Authorization

No authorization required

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