Justin Black 539ec23298 [python-client] Add model default values (#1776)
* Adds two models to the v2.0 spec, uses examples as defaults in python client

* Adds array default and type_holder_default and type_holder_example tests

* Re-generated python security client with ./bin/security/python-petstore.sh

* Changes comment text, rebased master

* Updates client + server samples

* Adds missing samples updates

* Changes python client to look for true or false with booleans in toDefaultValue

* Changes boolean casting to use Boolean.valueOf

* Adds deserialization fix for python tests

* Changes Mock to namedtuple in python deserialization tests

* Actually remove unittest.mock
2019-01-09 11:18:35 +08:00

2.0 KiB

petstore_api.FakeApi

All URIs are relative to *http://petstore.swagger.io */ ' " =end -- \r\n \n \r/v2 / ' " =end -- \r\n \n \r

Method HTTP request Description
test_code_inject____end__rn_n_r PUT /fake To test code injection */ ' " =end -- \r\n \n \r

test_code_inject____end__rn_n_r

test_code_inject____end__rn_n_r(test_code_inject____end____rn_n_r=test_code_inject____end____rn_n_r)

To test code injection */ ' " =end -- \r\n \n \r

To test code injection */ ' " =end -- \r\n \n \r

Example

from __future__ import print_function
import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = petstore_api.FakeApi()
test_code_inject____end____rn_n_r = 'test_code_inject____end____rn_n_r_example' # str | To test code injection */ ' \\\" =end -- \\\\r\\\\n \\\\n \\\\r (optional)

try:
    # To test code injection */ ' \" =end -- \\r\\n \\n \\r
    api_instance.test_code_inject____end__rn_n_r(test_code_inject____end____rn_n_r=test_code_inject____end____rn_n_r)
except ApiException as e:
    print("Exception when calling FakeApi->test_code_inject____end__rn_n_r: %s\n" % e)

Parameters

Name Type Description Notes
test_code_inject____end____rn_n_r str To test code injection */ ' \" =end -- \\r\\n \\n \\r [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded, */ " =end --
  • Accept: Not defined

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