diff --git a/modules/openapi-generator/src/main/resources/python-experimental/__init__test.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/__init__test.handlebars index 2d2e1b5c730..3d592080805 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/__init__test.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/__init__test.handlebars @@ -16,8 +16,8 @@ class ApiTestMixin: url: str, method: str = 'POST', body: typing.Optional[bytes] = None, - content_type: typing.Optional[str] = 'application/json', - accept_content_type: typing.Optional[str] = 'application/json', + content_type: typing.Optional[str] = None, + accept_content_type: typing.Optional[str] = None, stream: bool = False, ): headers = { diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars index 0ce4c0304d5..4e5757e11ce 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars @@ -35,11 +35,56 @@ class {{#with operations}}Test{{classname}}(ApiTestMixin, unittest.TestCase): """ from {{packageName}}.{{apiPackage}}.{{classFilename}}_endpoints import {{operationId}} as endpoint_module {{#each responses}} -{{#if @first}} + {{#if @first}} response_status = {{code}} {{#if content}} {{#each content}} - # TODO get response content working + accept_content_type = '{{{@key}}}' + +{{#if this.testCases}} + +{{#each testCases}} +{{#with this }} + # test_{{@key}}_{{#if valid}}passes{{else}}fails{{/if}} + # {{description}} + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( +{{#with data}} + {{> model_templates/payload_renderer endChar='' }} +{{/with}} + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) +{{#if valid}} + {{> api_test_partial }} + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.{{schema.baseName}}) + deserialized_response_body = endpoint_module.{{schema.baseName}}._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body +{{else}} + with self.assertRaises(({{packageName}}.ApiValueError, {{packageName}}.ApiTypeError)): + self.api.{{operationId}}( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '{{{path}}}', + method='{{httpMethod}}', + content_type=None, + accept_content_type=accept_content_type, + ) +{{/if}} +{{/with}} + +{{/each}} + +{{/if}} {{/each}} {{else}} response_body = '' @@ -58,46 +103,28 @@ class {{#with operations}}Test{{classname}}(ApiTestMixin, unittest.TestCase): # test_{{@key}}_{{#if valid}}passes{{else}}fails{{/if}} # {{description}} with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( {{#with data}} {{> model_templates/payload_renderer endChar='' }} {{/with}} ) {{#if valid}} body = endpoint_module.{{schema.baseName}}._from_openapi_data( -{{#with data}} - request_payload, -{{/with}} + payload, _configuration=self._configuration ) mock_request.return_value = self.response( self.json_bytes(response_body), status=response_status ) - api_response = self.api.{{operationId}}( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '{{{path}}}', - method='{{httpMethod}}', - body=self.json_bytes(request_payload), - content_type=content_type, - {{#unless produces}} - accept_content_type=None, - {{/unless}} - ) + {{> api_test_partial }} assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) {{else}} with self.assertRaises(({{packageName}}.ApiValueError, {{packageName}}.ApiTypeError)): body = endpoint_module.{{schema.baseName}}._from_openapi_data( -{{#with data}} - {{> model_templates/payload_renderer endChar=',' }} -{{/with}} + payload, _configuration=self._configuration ) self.api.{{operationId}}(body=body) @@ -112,7 +139,7 @@ class {{#with operations}}Test{{classname}}(ApiTestMixin, unittest.TestCase): {{/with}} {{else}} pass -{{/if}} + {{/if}} {{/each}} {{/with}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_test_partial.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_test_partial.handlebars new file mode 100644 index 00000000000..ea2eae3119a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_test_partial.handlebars @@ -0,0 +1,21 @@ +api_response = self.api.{{operationId}}( +{{#if bodyParam}} + body=body, + content_type=content_type +{{/if}} +{{#if produces}} + accept_content_types=(accept_content_type,) +{{/if}} +) +self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '{{{path}}}', + method='{{httpMethod}}', +{{#if bodyParam}} + body=self.json_bytes(payload), + content_type=content_type, +{{/if}} +{{#if produces}} + accept_content_type=accept_content_type, +{{/if}} +) diff --git a/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars index 7405a1c3203..a23f3a6a4fe 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars @@ -1102,9 +1102,6 @@ class DictBase(Discriminable): ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes ApiTypeError: when the input type is not in the list of allowed spec types """ - if isinstance(arg, cls): - # an instance of the correct type was passed in - return {} _path_to_schemas = super()._validate(arg, validation_metadata=validation_metadata) if not isinstance(arg, frozendict): return _path_to_schemas @@ -1655,18 +1652,6 @@ class ComposedBase(Discriminable): ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes ApiTypeError: when the input type is not in the list of allowed spec types """ - if isinstance(arg, Schema) and validation_metadata.from_server is False: - if isinstance(arg, cls): - # an instance of the correct type was passed in - return {} - raise ApiTypeError( - 'Incorrect type passed in, required type was {} and passed type was {} at {}'.format( - cls, - type(arg), - validation_metadata.path_to_item - ) - ) - # validation checking on types, validations, and enums path_to_schemas = super()._validate(arg, validation_metadata=validation_metadata) @@ -2098,43 +2083,6 @@ class DictSchema( schema_type_classes = set([NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema]) -def deserialize_file(response_data, configuration, content_disposition=None): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - Args: - param response_data (str): the file data to write - configuration (Configuration): the instance to use to convert files - - Keyword Args: - content_disposition (str): the value of the Content-Disposition - header - - Returns: - (file_type): the deserialized file which is open - The user is responsible for closing and reading the file - """ - fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - - f = open(path, "rb") - return f - - @functools.cache def get_new_class( class_name: str, diff --git a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml index 8fa24405035..a29049e4fa1 100644 --- a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml @@ -7,7 +7,9 @@ info: description: sample spec for testing openapi functionality, built from json schema tests for draft6 tags: -- name: requestBody +- name: operation.requestBody +- name: path.post +- name: contentType_json paths: /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody: post: @@ -24,9 +26,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes: + post: + operationId: postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AdditionalpropertiesAllowsASchemaWhichShouldValidate' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody: post: operationId: postAdditionalpropertiesCanExistByItselfRequestBody @@ -42,9 +60,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes: + post: + operationId: postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AdditionalpropertiesCanExistByItself' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AdditionalpropertiesCanExistByItself' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody: post: operationId: postAdditionalpropertiesAreAllowedByDefaultRequestBody @@ -60,9 +94,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes: + post: + operationId: postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AdditionalpropertiesAreAllowedByDefault' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AdditionalpropertiesAreAllowedByDefault' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody: post: operationId: postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody @@ -78,9 +128,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes: + post: + operationId: postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AdditionalpropertiesShouldNotLookInApplicators' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AdditionalpropertiesShouldNotLookInApplicators' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAllofRequestBody: post: operationId: postAllofRequestBody @@ -96,9 +162,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAllofResponseBodyForContentTypes: + post: + operationId: postAllofResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/Allof' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/Allof' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAllofWithBaseSchemaRequestBody: post: operationId: postAllofWithBaseSchemaRequestBody @@ -114,9 +196,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes: + post: + operationId: postAllofWithBaseSchemaResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AllofWithBaseSchema' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AllofWithBaseSchema' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAllofSimpleTypesRequestBody: post: operationId: postAllofSimpleTypesRequestBody @@ -132,9 +230,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAllofSimpleTypesResponseBodyForContentTypes: + post: + operationId: postAllofSimpleTypesResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AllofSimpleTypes' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AllofSimpleTypes' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAllofWithOneEmptySchemaRequestBody: post: operationId: postAllofWithOneEmptySchemaRequestBody @@ -150,9 +264,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes: + post: + operationId: postAllofWithOneEmptySchemaResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AllofWithOneEmptySchema' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AllofWithOneEmptySchema' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAllofWithTwoEmptySchemasRequestBody: post: operationId: postAllofWithTwoEmptySchemasRequestBody @@ -168,9 +298,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes: + post: + operationId: postAllofWithTwoEmptySchemasResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AllofWithTwoEmptySchemas' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AllofWithTwoEmptySchemas' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAllofWithTheFirstEmptySchemaRequestBody: post: operationId: postAllofWithTheFirstEmptySchemaRequestBody @@ -186,9 +332,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes: + post: + operationId: postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AllofWithTheFirstEmptySchema' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AllofWithTheFirstEmptySchema' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAllofWithTheLastEmptySchemaRequestBody: post: operationId: postAllofWithTheLastEmptySchemaRequestBody @@ -204,9 +366,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes: + post: + operationId: postAllofWithTheLastEmptySchemaResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AllofWithTheLastEmptySchema' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AllofWithTheLastEmptySchema' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody: post: operationId: postNestedAllofToCheckValidationSemanticsRequestBody @@ -222,9 +400,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes: + post: + operationId: postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/NestedAllofToCheckValidationSemantics' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/NestedAllofToCheckValidationSemantics' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAllofCombinedWithAnyofOneofRequestBody: post: operationId: postAllofCombinedWithAnyofOneofRequestBody @@ -240,9 +434,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes: + post: + operationId: postAllofCombinedWithAnyofOneofResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AllofCombinedWithAnyofOneof' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AllofCombinedWithAnyofOneof' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAnyofRequestBody: post: operationId: postAnyofRequestBody @@ -258,9 +468,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAnyofResponseBodyForContentTypes: + post: + operationId: postAnyofResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/Anyof' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/Anyof' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAnyofWithBaseSchemaRequestBody: post: operationId: postAnyofWithBaseSchemaRequestBody @@ -276,9 +502,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes: + post: + operationId: postAnyofWithBaseSchemaResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AnyofWithBaseSchema' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AnyofWithBaseSchema' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAnyofComplexTypesRequestBody: post: operationId: postAnyofComplexTypesRequestBody @@ -294,9 +536,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAnyofComplexTypesResponseBodyForContentTypes: + post: + operationId: postAnyofComplexTypesResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AnyofComplexTypes' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AnyofComplexTypes' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postAnyofWithOneEmptySchemaRequestBody: post: operationId: postAnyofWithOneEmptySchemaRequestBody @@ -312,9 +570,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes: + post: + operationId: postAnyofWithOneEmptySchemaResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/AnyofWithOneEmptySchema' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/AnyofWithOneEmptySchema' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody: post: operationId: postNestedAnyofToCheckValidationSemanticsRequestBody @@ -330,9 +604,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes: + post: + operationId: postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/NestedAnyofToCheckValidationSemantics' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/NestedAnyofToCheckValidationSemantics' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postInvalidStringValueForDefaultRequestBody: post: operationId: postInvalidStringValueForDefaultRequestBody @@ -348,9 +638,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes: + post: + operationId: postInvalidStringValueForDefaultResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/InvalidStringValueForDefault' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/InvalidStringValueForDefault' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody: post: operationId: postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody @@ -366,9 +672,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes: + post: + operationId: postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postSimpleEnumValidationRequestBody: post: operationId: postSimpleEnumValidationRequestBody @@ -384,9 +706,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postSimpleEnumValidationResponseBodyForContentTypes: + post: + operationId: postSimpleEnumValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/SimpleEnumValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/SimpleEnumValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postEnumsInPropertiesRequestBody: post: operationId: postEnumsInPropertiesRequestBody @@ -402,9 +740,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postEnumsInPropertiesResponseBodyForContentTypes: + post: + operationId: postEnumsInPropertiesResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/EnumsInProperties' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/EnumsInProperties' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postEnumWithEscapedCharactersRequestBody: post: operationId: postEnumWithEscapedCharactersRequestBody @@ -420,9 +774,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes: + post: + operationId: postEnumWithEscapedCharactersResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/EnumWithEscapedCharacters' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/EnumWithEscapedCharacters' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postEnumWithFalseDoesNotMatch0RequestBody: post: operationId: postEnumWithFalseDoesNotMatch0RequestBody @@ -438,9 +808,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes: + post: + operationId: postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/EnumWithFalseDoesNotMatch0' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/EnumWithFalseDoesNotMatch0' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postEnumWithTrueDoesNotMatch1RequestBody: post: operationId: postEnumWithTrueDoesNotMatch1RequestBody @@ -456,9 +842,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes: + post: + operationId: postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/EnumWithTrueDoesNotMatch1' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/EnumWithTrueDoesNotMatch1' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postEnumWith0DoesNotMatchFalseRequestBody: post: operationId: postEnumWith0DoesNotMatchFalseRequestBody @@ -474,9 +876,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes: + post: + operationId: postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/EnumWith0DoesNotMatchFalse' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/EnumWith0DoesNotMatchFalse' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postEnumWith1DoesNotMatchTrueRequestBody: post: operationId: postEnumWith1DoesNotMatchTrueRequestBody @@ -492,9 +910,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes: + post: + operationId: postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/EnumWith1DoesNotMatchTrue' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/EnumWith1DoesNotMatchTrue' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postNulCharactersInStringsRequestBody: post: operationId: postNulCharactersInStringsRequestBody @@ -510,9 +944,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postNulCharactersInStringsResponseBodyForContentTypes: + post: + operationId: postNulCharactersInStringsResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/NulCharactersInStrings' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/NulCharactersInStrings' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postEmailFormatRequestBody: post: operationId: postEmailFormatRequestBody @@ -528,9 +978,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postEmailFormatResponseBodyForContentTypes: + post: + operationId: postEmailFormatResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/EmailFormat' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/EmailFormat' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postIpv4FormatRequestBody: post: operationId: postIpv4FormatRequestBody @@ -546,9 +1012,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postIpv4FormatResponseBodyForContentTypes: + post: + operationId: postIpv4FormatResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/Ipv4Format' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/Ipv4Format' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postIpv6FormatRequestBody: post: operationId: postIpv6FormatRequestBody @@ -564,9 +1046,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postIpv6FormatResponseBodyForContentTypes: + post: + operationId: postIpv6FormatResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/Ipv6Format' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/Ipv6Format' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postHostnameFormatRequestBody: post: operationId: postHostnameFormatRequestBody @@ -582,9 +1080,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postHostnameFormatResponseBodyForContentTypes: + post: + operationId: postHostnameFormatResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/HostnameFormat' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/HostnameFormat' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postDateTimeFormatRequestBody: post: operationId: postDateTimeFormatRequestBody @@ -600,9 +1114,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postDateTimeFormatResponseBodyForContentTypes: + post: + operationId: postDateTimeFormatResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/DateTimeFormat' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/DateTimeFormat' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postJsonPointerFormatRequestBody: post: operationId: postJsonPointerFormatRequestBody @@ -618,9 +1148,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postJsonPointerFormatResponseBodyForContentTypes: + post: + operationId: postJsonPointerFormatResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/JsonPointerFormat' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/JsonPointerFormat' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postUriFormatRequestBody: post: operationId: postUriFormatRequestBody @@ -636,9 +1182,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postUriFormatResponseBodyForContentTypes: + post: + operationId: postUriFormatResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/UriFormat' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/UriFormat' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postUriReferenceFormatRequestBody: post: operationId: postUriReferenceFormatRequestBody @@ -654,9 +1216,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postUriReferenceFormatResponseBodyForContentTypes: + post: + operationId: postUriReferenceFormatResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/UriReferenceFormat' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/UriReferenceFormat' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postUriTemplateFormatRequestBody: post: operationId: postUriTemplateFormatRequestBody @@ -672,9 +1250,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postUriTemplateFormatResponseBodyForContentTypes: + post: + operationId: postUriTemplateFormatResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/UriTemplateFormat' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/UriTemplateFormat' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postNestedItemsRequestBody: post: operationId: postNestedItemsRequestBody @@ -690,9 +1284,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postNestedItemsResponseBodyForContentTypes: + post: + operationId: postNestedItemsResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/NestedItems' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/NestedItems' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postMaximumValidationRequestBody: post: operationId: postMaximumValidationRequestBody @@ -708,9 +1318,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postMaximumValidationResponseBodyForContentTypes: + post: + operationId: postMaximumValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/MaximumValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/MaximumValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody: post: operationId: postMaximumValidationWithUnsignedIntegerRequestBody @@ -726,9 +1352,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes: + post: + operationId: postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/MaximumValidationWithUnsignedInteger' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/MaximumValidationWithUnsignedInteger' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postMaxitemsValidationRequestBody: post: operationId: postMaxitemsValidationRequestBody @@ -744,9 +1386,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postMaxitemsValidationResponseBodyForContentTypes: + post: + operationId: postMaxitemsValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/MaxitemsValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/MaxitemsValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postMaxlengthValidationRequestBody: post: operationId: postMaxlengthValidationRequestBody @@ -762,9 +1420,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postMaxlengthValidationResponseBodyForContentTypes: + post: + operationId: postMaxlengthValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/MaxlengthValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/MaxlengthValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postMaxpropertiesValidationRequestBody: post: operationId: postMaxpropertiesValidationRequestBody @@ -780,9 +1454,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes: + post: + operationId: postMaxpropertiesValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/MaxpropertiesValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/MaxpropertiesValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody: post: operationId: postMaxproperties0MeansTheObjectIsEmptyRequestBody @@ -798,9 +1488,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes: + post: + operationId: postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/Maxproperties0MeansTheObjectIsEmpty' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/Maxproperties0MeansTheObjectIsEmpty' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postMinimumValidationRequestBody: post: operationId: postMinimumValidationRequestBody @@ -816,9 +1522,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postMinimumValidationResponseBodyForContentTypes: + post: + operationId: postMinimumValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/MinimumValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/MinimumValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postMinimumValidationWithSignedIntegerRequestBody: post: operationId: postMinimumValidationWithSignedIntegerRequestBody @@ -834,9 +1556,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes: + post: + operationId: postMinimumValidationWithSignedIntegerResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/MinimumValidationWithSignedInteger' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/MinimumValidationWithSignedInteger' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postMinitemsValidationRequestBody: post: operationId: postMinitemsValidationRequestBody @@ -852,9 +1590,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postMinitemsValidationResponseBodyForContentTypes: + post: + operationId: postMinitemsValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/MinitemsValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/MinitemsValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postMinlengthValidationRequestBody: post: operationId: postMinlengthValidationRequestBody @@ -870,9 +1624,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postMinlengthValidationResponseBodyForContentTypes: + post: + operationId: postMinlengthValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/MinlengthValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/MinlengthValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postMinpropertiesValidationRequestBody: post: operationId: postMinpropertiesValidationRequestBody @@ -888,9 +1658,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postMinpropertiesValidationResponseBodyForContentTypes: + post: + operationId: postMinpropertiesValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/MinpropertiesValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/MinpropertiesValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postByIntRequestBody: post: operationId: postByIntRequestBody @@ -906,9 +1692,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postByIntResponseBodyForContentTypes: + post: + operationId: postByIntResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/ByInt' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/ByInt' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postByNumberRequestBody: post: operationId: postByNumberRequestBody @@ -924,9 +1726,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postByNumberResponseBodyForContentTypes: + post: + operationId: postByNumberResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/ByNumber' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/ByNumber' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postBySmallNumberRequestBody: post: operationId: postBySmallNumberRequestBody @@ -942,9 +1760,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postBySmallNumberResponseBodyForContentTypes: + post: + operationId: postBySmallNumberResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/BySmallNumber' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/BySmallNumber' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody: post: operationId: postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody @@ -960,9 +1794,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes: + post: + operationId: postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postNotRequestBody: post: operationId: postNotRequestBody @@ -978,9 +1828,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postNotResponseBodyForContentTypes: + post: + operationId: postNotResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/Not' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/Not' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postNotMoreComplexSchemaRequestBody: post: operationId: postNotMoreComplexSchemaRequestBody @@ -996,9 +1862,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes: + post: + operationId: postNotMoreComplexSchemaResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/NotMoreComplexSchema' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/NotMoreComplexSchema' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postForbiddenPropertyRequestBody: post: operationId: postForbiddenPropertyRequestBody @@ -1014,9 +1896,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postForbiddenPropertyResponseBodyForContentTypes: + post: + operationId: postForbiddenPropertyResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/ForbiddenProperty' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/ForbiddenProperty' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postOneofRequestBody: post: operationId: postOneofRequestBody @@ -1032,9 +1930,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postOneofResponseBodyForContentTypes: + post: + operationId: postOneofResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/Oneof' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/Oneof' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postOneofWithBaseSchemaRequestBody: post: operationId: postOneofWithBaseSchemaRequestBody @@ -1050,9 +1964,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes: + post: + operationId: postOneofWithBaseSchemaResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/OneofWithBaseSchema' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/OneofWithBaseSchema' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postOneofComplexTypesRequestBody: post: operationId: postOneofComplexTypesRequestBody @@ -1068,9 +1998,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postOneofComplexTypesResponseBodyForContentTypes: + post: + operationId: postOneofComplexTypesResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/OneofComplexTypes' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/OneofComplexTypes' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postOneofWithEmptySchemaRequestBody: post: operationId: postOneofWithEmptySchemaRequestBody @@ -1086,9 +2032,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes: + post: + operationId: postOneofWithEmptySchemaResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/OneofWithEmptySchema' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/OneofWithEmptySchema' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody: post: operationId: postNestedOneofToCheckValidationSemanticsRequestBody @@ -1104,9 +2066,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes: + post: + operationId: postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/NestedOneofToCheckValidationSemantics' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/NestedOneofToCheckValidationSemantics' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postPatternValidationRequestBody: post: operationId: postPatternValidationRequestBody @@ -1122,9 +2100,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postPatternValidationResponseBodyForContentTypes: + post: + operationId: postPatternValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/PatternValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/PatternValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postPatternIsNotAnchoredRequestBody: post: operationId: postPatternIsNotAnchoredRequestBody @@ -1140,9 +2134,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes: + post: + operationId: postPatternIsNotAnchoredResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/PatternIsNotAnchored' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/PatternIsNotAnchored' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postObjectPropertiesValidationRequestBody: post: operationId: postObjectPropertiesValidationRequestBody @@ -1158,9 +2168,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes: + post: + operationId: postObjectPropertiesValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/ObjectPropertiesValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/ObjectPropertiesValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postPropertiesWithEscapedCharactersRequestBody: post: operationId: postPropertiesWithEscapedCharactersRequestBody @@ -1176,9 +2202,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes: + post: + operationId: postPropertiesWithEscapedCharactersResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/PropertiesWithEscapedCharacters' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/PropertiesWithEscapedCharacters' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody: post: operationId: postPropertyNamedRefThatIsNotAReferenceRequestBody @@ -1194,9 +2236,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes: + post: + operationId: postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/PropertyNamedRefThatIsNotAReference' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/PropertyNamedRefThatIsNotAReference' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postRefInAdditionalpropertiesRequestBody: post: operationId: postRefInAdditionalpropertiesRequestBody @@ -1212,9 +2270,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes: + post: + operationId: postRefInAdditionalpropertiesResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/RefInAdditionalproperties' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/RefInAdditionalproperties' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postRefInItemsRequestBody: post: operationId: postRefInItemsRequestBody @@ -1230,9 +2304,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postRefInItemsResponseBodyForContentTypes: + post: + operationId: postRefInItemsResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/RefInItems' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/RefInItems' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postRefInPropertyRequestBody: post: operationId: postRefInPropertyRequestBody @@ -1248,9 +2338,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postRefInPropertyResponseBodyForContentTypes: + post: + operationId: postRefInPropertyResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/RefInProperty' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/RefInProperty' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postRefInAllofRequestBody: post: operationId: postRefInAllofRequestBody @@ -1266,9 +2372,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postRefInAllofResponseBodyForContentTypes: + post: + operationId: postRefInAllofResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/RefInAllof' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/RefInAllof' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postRefInOneofRequestBody: post: operationId: postRefInOneofRequestBody @@ -1284,9 +2406,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postRefInOneofResponseBodyForContentTypes: + post: + operationId: postRefInOneofResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/RefInOneof' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/RefInOneof' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postRefInAnyofRequestBody: post: operationId: postRefInAnyofRequestBody @@ -1302,9 +2440,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postRefInAnyofResponseBodyForContentTypes: + post: + operationId: postRefInAnyofResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/RefInAnyof' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/RefInAnyof' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postRequiredValidationRequestBody: post: operationId: postRequiredValidationRequestBody @@ -1320,9 +2474,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postRequiredValidationResponseBodyForContentTypes: + post: + operationId: postRequiredValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/RequiredValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/RequiredValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postRequiredDefaultValidationRequestBody: post: operationId: postRequiredDefaultValidationRequestBody @@ -1338,9 +2508,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes: + post: + operationId: postRequiredDefaultValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/RequiredDefaultValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/RequiredDefaultValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postRequiredWithEmptyArrayRequestBody: post: operationId: postRequiredWithEmptyArrayRequestBody @@ -1356,9 +2542,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes: + post: + operationId: postRequiredWithEmptyArrayResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/RequiredWithEmptyArray' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/RequiredWithEmptyArray' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postIntegerTypeMatchesIntegersRequestBody: post: operationId: postIntegerTypeMatchesIntegersRequestBody @@ -1374,9 +2576,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes: + post: + operationId: postIntegerTypeMatchesIntegersResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/IntegerTypeMatchesIntegers' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/IntegerTypeMatchesIntegers' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postNumberTypeMatchesNumbersRequestBody: post: operationId: postNumberTypeMatchesNumbersRequestBody @@ -1392,9 +2610,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes: + post: + operationId: postNumberTypeMatchesNumbersResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/NumberTypeMatchesNumbers' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/NumberTypeMatchesNumbers' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postStringTypeMatchesStringsRequestBody: post: operationId: postStringTypeMatchesStringsRequestBody @@ -1410,9 +2644,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes: + post: + operationId: postStringTypeMatchesStringsResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/StringTypeMatchesStrings' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/StringTypeMatchesStrings' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postObjectTypeMatchesObjectsRequestBody: post: operationId: postObjectTypeMatchesObjectsRequestBody @@ -1428,9 +2678,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes: + post: + operationId: postObjectTypeMatchesObjectsResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/ObjectTypeMatchesObjects' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/ObjectTypeMatchesObjects' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postBooleanTypeMatchesBooleansRequestBody: post: operationId: postBooleanTypeMatchesBooleansRequestBody @@ -1446,9 +2712,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes: + post: + operationId: postBooleanTypeMatchesBooleansResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/BooleanTypeMatchesBooleans' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/BooleanTypeMatchesBooleans' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody: post: operationId: postNullTypeMatchesOnlyTheNullObjectRequestBody @@ -1464,9 +2746,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes: + post: + operationId: postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/NullTypeMatchesOnlyTheNullObject' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/NullTypeMatchesOnlyTheNullObject' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postArrayTypeMatchesArraysRequestBody: post: operationId: postArrayTypeMatchesArraysRequestBody @@ -1482,9 +2780,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes: + post: + operationId: postArrayTypeMatchesArraysResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/ArrayTypeMatchesArrays' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/ArrayTypeMatchesArrays' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postUniqueitemsValidationRequestBody: post: operationId: postUniqueitemsValidationRequestBody @@ -1500,9 +2814,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postUniqueitemsValidationResponseBodyForContentTypes: + post: + operationId: postUniqueitemsValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/UniqueitemsValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/UniqueitemsValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json /requestBody/postUniqueitemsFalseValidationRequestBody: post: operationId: postUniqueitemsFalseValidationRequestBody @@ -1518,9 +2848,25 @@ paths: '200': description: success tags: - - requestBody - - post - - json + - operation.requestBody + - path.post + - contentType_json + /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes: + post: + operationId: postUniqueitemsFalseValidationResponseBodyForContentTypes + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/UniqueitemsFalseValidation' + x-schema-test-examples: + $ref: '#/components/x-schema-test-examples/UniqueitemsFalseValidation' + tags: + - response.content.contentType.schema + - path.post + - contentType_json components: schemas: AdditionalpropertiesAllowsASchemaWhichShouldValidate: @@ -1909,6 +3255,12 @@ components: foo: 1 bar: true valid: false + ValidTestCase: + description: valid test case + data: + foo: false + bar: true + valid: true Allof: Allof: description: allOf @@ -2790,6 +4142,10 @@ components: error data: 1.0e+308 valid: false + ValidIntegerWithMultipleofFloat: + description: valid integer with multipleOf float + data: 123456789 + valid: true Not: Allowed: description: allowed diff --git a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/openapi_additions/additionalProperties.json b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/openapi_additions/additionalProperties.json new file mode 100755 index 00000000000..e6c2f717013 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/openapi_additions/additionalProperties.json @@ -0,0 +1,18 @@ +[ + { + "description": "additionalProperties should not look in applicators", + "schema": { + "allOf": [ + {"properties": {"foo": {}}} + ], + "additionalProperties": {"type": "boolean"} + }, + "tests": [ + { + "description": "valid test case", + "data": {"foo": false, "bar": true}, + "valid": true + } + ] + } +] diff --git a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/openapi_additions/multipleOf.json b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/openapi_additions/multipleOf.json new file mode 100755 index 00000000000..0b349742774 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/openapi_additions/multipleOf.json @@ -0,0 +1,13 @@ +[ + { + "description": "invalid instance should not raise error when float division = inf", + "schema": {"type": "integer", "multipleOf": 0.123456789}, + "tests": [ + { + "description": "valid integer with multipleOf float", + "data": 123456789, + "valid": true + } + ] + } +] diff --git a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/spec_writer.py b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/spec_writer.py index 04a3fa5b339..a0ae8492878 100644 --- a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/spec_writer.py +++ b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/spec_writer.py @@ -227,7 +227,7 @@ FILEPATH_TO_EXCLUDE_REASON = { JSON_SCHEMA_TEST_FILE_TO_FOLDERS = { 'additionalItems.json': (json_schema_test_draft,), - 'additionalProperties.json': (json_schema_test_draft,), + 'additionalProperties.json': (json_schema_test_draft, openapi_additions), 'allOf.json': (json_schema_test_draft,), 'anyOf.json': (json_schema_test_draft,), 'boolean_schema.json': (json_schema_test_draft,), @@ -251,7 +251,7 @@ JSON_SCHEMA_TEST_FILE_TO_FOLDERS = { 'minItems.json': (json_schema_test_draft,), 'minLength.json': (json_schema_test_draft,), 'minProperties.json': (json_schema_test_draft,), - 'multipleOf.json': (json_schema_test_draft,), + 'multipleOf.json': (json_schema_test_draft, openapi_additions), 'not.json': (json_schema_test_draft,), 'oneOf.json': (json_schema_test_draft,), 'pattern.json': (json_schema_test_draft,), @@ -461,12 +461,43 @@ def generate_post_operation_with_request_body( } ) + +def generate_post_operation_with_response_content_schema( + component_name: str, + tags: typing.List[OpenApiTag] +) -> OpenApiOperation: + method = 'post' + ref_schema_path = f'#/components/schemas/{component_name}' + ref_test_example_path = f'#/components/x-schema-test-examples/{component_name}' + media_type = OpenApiMediaType( + { + 'schema': OpenApiSchema({'$ref': ref_schema_path}), + 'x-schema-test-examples': {'$ref': ref_test_example_path} + } + ) + operationId = f'{method}{component_name}ResponseBodyForContentTypes' + response_object = OpenApiResponseObject( + { + 'description': 'success', + 'content': {'application/json': media_type} + } + ) + return OpenApiOperation( + { + 'operationId': operationId, + 'responses': {'200': response_object}, + 'tags': [tag.name for tag in tags] + } + ) + + def write_openapi_spec(): openapi = get_new_openapi() - request_body_tag = OpenApiTag(name='requestBody') - post_tag = OpenApiTag(name='post') - json_tag = OpenApiTag(name='json') - openapi.tags.append(request_body_tag) + request_body_tag = OpenApiTag(name='operation.requestBody') + post_tag = OpenApiTag(name='path.post') + json_tag = OpenApiTag(name='contentType_json') + response_content_tag = OpenApiTag(name='response.content.contentType.schema') + openapi.tags.extend([request_body_tag, post_tag, json_tag]) # write component schemas and tests for json_schema_test_file, folders in JSON_SCHEMA_TEST_FILE_TO_FOLDERS.items(): component_schemas, component_name_to_test_examples = ( @@ -484,8 +515,12 @@ def write_openapi_spec(): operation = generate_post_operation_with_request_body(component_name, [request_body_tag, post_tag, json_tag]) path_item = OpenApiPathItem(post=operation) openapi.paths[f'/requestBody/{operation["operationId"]}'] = path_item + # todo add put and patch with paths requestBody/someIdentifier + operation = generate_post_operation_with_response_content_schema(component_name, [response_content_tag, post_tag, json_tag]) + path_item = OpenApiPathItem(post=operation) + openapi.paths[f'/responseBody/{operation["operationId"]}'] = path_item print( yaml.dump( dataclasses.asdict(openapi), diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/.openapi-generator/FILES b/samples/openapi3/client/3_0_3_unit_test/python-experimental/.openapi-generator/FILES index b01c4865bf1..d0b7e82947c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/.openapi-generator/FILES +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/.openapi-generator/FILES @@ -23,6 +23,7 @@ docs/BooleanTypeMatchesBooleans.md docs/ByInt.md docs/ByNumber.md docs/BySmallNumber.md +docs/ContentTypeJsonApi.md docs/DateTimeFormat.md docs/EmailFormat.md docs/EnumWith0DoesNotMatchFalse.md @@ -38,7 +39,6 @@ docs/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md docs/InvalidStringValueForDefault.md docs/Ipv4Format.md docs/Ipv6Format.md -docs/JsonApi.md docs/JsonPointerFormat.md docs/MaximumValidation.md docs/MaximumValidationWithUnsignedInteger.md @@ -65,9 +65,10 @@ docs/Oneof.md docs/OneofComplexTypes.md docs/OneofWithBaseSchema.md docs/OneofWithEmptySchema.md +docs/OperationRequestBodyApi.md +docs/PathPostApi.md docs/PatternIsNotAnchored.md docs/PatternValidation.md -docs/PostApi.md docs/PropertiesWithEscapedCharacters.md docs/PropertyNamedRefThatIsNotAReference.md docs/RefInAdditionalproperties.md @@ -76,10 +77,10 @@ docs/RefInAnyof.md docs/RefInItems.md docs/RefInOneof.md docs/RefInProperty.md -docs/RequestBodyApi.md docs/RequiredDefaultValidation.md docs/RequiredValidation.md docs/RequiredWithEmptyArray.md +docs/ResponseContentContentTypeSchemaApi.md docs/SimpleEnumValidation.md docs/StringTypeMatchesStrings.md docs/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md @@ -115,6 +116,7 @@ test/test_boolean_type_matches_booleans.py test/test_by_int.py test/test_by_number.py test/test_by_small_number.py +test/test_content_type_json_api.py test/test_date_time_format.py test/test_email_format.py test/test_enum_with0_does_not_match_false.py @@ -130,7 +132,6 @@ test/test_invalid_instance_should_not_raise_error_when_float_division_inf.py test/test_invalid_string_value_for_default.py test/test_ipv4_format.py test/test_ipv6_format.py -test/test_json_api.py test/test_json_pointer_format.py test/test_maximum_validation.py test/test_maximum_validation_with_unsigned_integer.py @@ -157,9 +158,10 @@ test/test_oneof.py test/test_oneof_complex_types.py test/test_oneof_with_base_schema.py test/test_oneof_with_empty_schema.py +test/test_operation_request_body_api.py +test/test_path_post_api.py test/test_pattern_is_not_anchored.py test/test_pattern_validation.py -test/test_post_api.py test/test_properties_with_escaped_characters.py test/test_property_named_ref_that_is_not_a_reference.py test/test_ref_in_additionalproperties.py @@ -168,10 +170,10 @@ test/test_ref_in_anyof.py test/test_ref_in_items.py test/test_ref_in_oneof.py test/test_ref_in_property.py -test/test_request_body_api.py test/test_required_default_validation.py test/test_required_validation.py test/test_required_with_empty_array.py +test/test_response_content_content_type_schema_api.py test/test_simple_enum_validation.py test/test_string_type_matches_strings.py test/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py @@ -183,9 +185,10 @@ test/test_uri_template_format.py tox.ini unit_test_api/__init__.py unit_test_api/api/__init__.py -unit_test_api/api/json_api.py -unit_test_api/api/post_api.py -unit_test_api/api/request_body_api.py +unit_test_api/api/content_type_json_api.py +unit_test_api/api/operation_request_body_api.py +unit_test_api/api/path_post_api.py +unit_test_api/api/response_content_content_type_schema_api.py unit_test_api/api_client.py unit_test_api/apis/__init__.py unit_test_api/configuration.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/README.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/README.md index c7aecb39d3d..bdb6df1dc5f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/README.md +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/README.md @@ -51,7 +51,7 @@ Please follow the [installation procedure](#installation--usage) and then run th import time import unit_test_api from pprint import pprint -from unit_test_api.api import json_api +from unit_test_api.api import content_type_json_api from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself @@ -129,7 +129,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) additionalproperties_allows_a_schema_which_should_validate = AdditionalpropertiesAllowsASchemaWhichShouldValidate( foo=None, bar=None, @@ -138,7 +138,7 @@ with unit_test_api.ApiClient(configuration) as api_client: try: api_instance.post_additionalproperties_allows_a_schema_which_should_validate_request_body(additionalproperties_allows_a_schema_which_should_validate) except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %s\n" % e) + print("Exception when calling ContentTypeJsonApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %s\n" % e) ``` ## Documentation for API Endpoints @@ -147,258 +147,510 @@ All URIs are relative to *https://someserver.com/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*JsonApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](docs/JsonApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -*JsonApi* | [**post_additionalproperties_are_allowed_by_default_request_body**](docs/JsonApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -*JsonApi* | [**post_additionalproperties_can_exist_by_itself_request_body**](docs/JsonApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -*JsonApi* | [**post_additionalproperties_should_not_look_in_applicators_request_body**](docs/JsonApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -*JsonApi* | [**post_allof_combined_with_anyof_oneof_request_body**](docs/JsonApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -*JsonApi* | [**post_allof_request_body**](docs/JsonApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | -*JsonApi* | [**post_allof_simple_types_request_body**](docs/JsonApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | -*JsonApi* | [**post_allof_with_base_schema_request_body**](docs/JsonApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | -*JsonApi* | [**post_allof_with_one_empty_schema_request_body**](docs/JsonApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | -*JsonApi* | [**post_allof_with_the_first_empty_schema_request_body**](docs/JsonApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -*JsonApi* | [**post_allof_with_the_last_empty_schema_request_body**](docs/JsonApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -*JsonApi* | [**post_allof_with_two_empty_schemas_request_body**](docs/JsonApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -*JsonApi* | [**post_anyof_complex_types_request_body**](docs/JsonApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | -*JsonApi* | [**post_anyof_request_body**](docs/JsonApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | -*JsonApi* | [**post_anyof_with_base_schema_request_body**](docs/JsonApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | -*JsonApi* | [**post_anyof_with_one_empty_schema_request_body**](docs/JsonApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -*JsonApi* | [**post_array_type_matches_arrays_request_body**](docs/JsonApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | -*JsonApi* | [**post_boolean_type_matches_booleans_request_body**](docs/JsonApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -*JsonApi* | [**post_by_int_request_body**](docs/JsonApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | -*JsonApi* | [**post_by_number_request_body**](docs/JsonApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | -*JsonApi* | [**post_by_small_number_request_body**](docs/JsonApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | -*JsonApi* | [**post_date_time_format_request_body**](docs/JsonApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | -*JsonApi* | [**post_email_format_request_body**](docs/JsonApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | -*JsonApi* | [**post_enum_with0_does_not_match_false_request_body**](docs/JsonApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -*JsonApi* | [**post_enum_with1_does_not_match_true_request_body**](docs/JsonApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -*JsonApi* | [**post_enum_with_escaped_characters_request_body**](docs/JsonApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | -*JsonApi* | [**post_enum_with_false_does_not_match0_request_body**](docs/JsonApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -*JsonApi* | [**post_enum_with_true_does_not_match1_request_body**](docs/JsonApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -*JsonApi* | [**post_enums_in_properties_request_body**](docs/JsonApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | -*JsonApi* | [**post_forbidden_property_request_body**](docs/JsonApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | -*JsonApi* | [**post_hostname_format_request_body**](docs/JsonApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | -*JsonApi* | [**post_integer_type_matches_integers_request_body**](docs/JsonApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -*JsonApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](docs/JsonApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -*JsonApi* | [**post_invalid_string_value_for_default_request_body**](docs/JsonApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | -*JsonApi* | [**post_ipv4_format_request_body**](docs/JsonApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | -*JsonApi* | [**post_ipv6_format_request_body**](docs/JsonApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | -*JsonApi* | [**post_json_pointer_format_request_body**](docs/JsonApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | -*JsonApi* | [**post_maximum_validation_request_body**](docs/JsonApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | -*JsonApi* | [**post_maximum_validation_with_unsigned_integer_request_body**](docs/JsonApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -*JsonApi* | [**post_maxitems_validation_request_body**](docs/JsonApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | -*JsonApi* | [**post_maxlength_validation_request_body**](docs/JsonApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | -*JsonApi* | [**post_maxproperties0_means_the_object_is_empty_request_body**](docs/JsonApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -*JsonApi* | [**post_maxproperties_validation_request_body**](docs/JsonApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | -*JsonApi* | [**post_minimum_validation_request_body**](docs/JsonApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | -*JsonApi* | [**post_minimum_validation_with_signed_integer_request_body**](docs/JsonApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -*JsonApi* | [**post_minitems_validation_request_body**](docs/JsonApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | -*JsonApi* | [**post_minlength_validation_request_body**](docs/JsonApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | -*JsonApi* | [**post_minproperties_validation_request_body**](docs/JsonApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | -*JsonApi* | [**post_nested_allof_to_check_validation_semantics_request_body**](docs/JsonApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -*JsonApi* | [**post_nested_anyof_to_check_validation_semantics_request_body**](docs/JsonApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -*JsonApi* | [**post_nested_items_request_body**](docs/JsonApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | -*JsonApi* | [**post_nested_oneof_to_check_validation_semantics_request_body**](docs/JsonApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -*JsonApi* | [**post_not_more_complex_schema_request_body**](docs/JsonApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | -*JsonApi* | [**post_not_request_body**](docs/JsonApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | -*JsonApi* | [**post_nul_characters_in_strings_request_body**](docs/JsonApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | -*JsonApi* | [**post_null_type_matches_only_the_null_object_request_body**](docs/JsonApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -*JsonApi* | [**post_number_type_matches_numbers_request_body**](docs/JsonApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | -*JsonApi* | [**post_object_properties_validation_request_body**](docs/JsonApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | -*JsonApi* | [**post_object_type_matches_objects_request_body**](docs/JsonApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | -*JsonApi* | [**post_oneof_complex_types_request_body**](docs/JsonApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | -*JsonApi* | [**post_oneof_request_body**](docs/JsonApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | -*JsonApi* | [**post_oneof_with_base_schema_request_body**](docs/JsonApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | -*JsonApi* | [**post_oneof_with_empty_schema_request_body**](docs/JsonApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | -*JsonApi* | [**post_pattern_is_not_anchored_request_body**](docs/JsonApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | -*JsonApi* | [**post_pattern_validation_request_body**](docs/JsonApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | -*JsonApi* | [**post_properties_with_escaped_characters_request_body**](docs/JsonApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -*JsonApi* | [**post_property_named_ref_that_is_not_a_reference_request_body**](docs/JsonApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -*JsonApi* | [**post_ref_in_additionalproperties_request_body**](docs/JsonApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | -*JsonApi* | [**post_ref_in_allof_request_body**](docs/JsonApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | -*JsonApi* | [**post_ref_in_anyof_request_body**](docs/JsonApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | -*JsonApi* | [**post_ref_in_items_request_body**](docs/JsonApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | -*JsonApi* | [**post_ref_in_oneof_request_body**](docs/JsonApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | -*JsonApi* | [**post_ref_in_property_request_body**](docs/JsonApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | -*JsonApi* | [**post_required_default_validation_request_body**](docs/JsonApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | -*JsonApi* | [**post_required_validation_request_body**](docs/JsonApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | -*JsonApi* | [**post_required_with_empty_array_request_body**](docs/JsonApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | -*JsonApi* | [**post_simple_enum_validation_request_body**](docs/JsonApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | -*JsonApi* | [**post_string_type_matches_strings_request_body**](docs/JsonApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | -*JsonApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](docs/JsonApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -*JsonApi* | [**post_uniqueitems_false_validation_request_body**](docs/JsonApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | -*JsonApi* | [**post_uniqueitems_validation_request_body**](docs/JsonApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | -*JsonApi* | [**post_uri_format_request_body**](docs/JsonApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | -*JsonApi* | [**post_uri_reference_format_request_body**](docs/JsonApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | -*JsonApi* | [**post_uri_template_format_request_body**](docs/JsonApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | -*PostApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](docs/PostApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -*PostApi* | [**post_additionalproperties_are_allowed_by_default_request_body**](docs/PostApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -*PostApi* | [**post_additionalproperties_can_exist_by_itself_request_body**](docs/PostApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -*PostApi* | [**post_additionalproperties_should_not_look_in_applicators_request_body**](docs/PostApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -*PostApi* | [**post_allof_combined_with_anyof_oneof_request_body**](docs/PostApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -*PostApi* | [**post_allof_request_body**](docs/PostApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | -*PostApi* | [**post_allof_simple_types_request_body**](docs/PostApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | -*PostApi* | [**post_allof_with_base_schema_request_body**](docs/PostApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | -*PostApi* | [**post_allof_with_one_empty_schema_request_body**](docs/PostApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | -*PostApi* | [**post_allof_with_the_first_empty_schema_request_body**](docs/PostApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -*PostApi* | [**post_allof_with_the_last_empty_schema_request_body**](docs/PostApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -*PostApi* | [**post_allof_with_two_empty_schemas_request_body**](docs/PostApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -*PostApi* | [**post_anyof_complex_types_request_body**](docs/PostApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | -*PostApi* | [**post_anyof_request_body**](docs/PostApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | -*PostApi* | [**post_anyof_with_base_schema_request_body**](docs/PostApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | -*PostApi* | [**post_anyof_with_one_empty_schema_request_body**](docs/PostApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -*PostApi* | [**post_array_type_matches_arrays_request_body**](docs/PostApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | -*PostApi* | [**post_boolean_type_matches_booleans_request_body**](docs/PostApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -*PostApi* | [**post_by_int_request_body**](docs/PostApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | -*PostApi* | [**post_by_number_request_body**](docs/PostApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | -*PostApi* | [**post_by_small_number_request_body**](docs/PostApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | -*PostApi* | [**post_date_time_format_request_body**](docs/PostApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | -*PostApi* | [**post_email_format_request_body**](docs/PostApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | -*PostApi* | [**post_enum_with0_does_not_match_false_request_body**](docs/PostApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -*PostApi* | [**post_enum_with1_does_not_match_true_request_body**](docs/PostApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -*PostApi* | [**post_enum_with_escaped_characters_request_body**](docs/PostApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | -*PostApi* | [**post_enum_with_false_does_not_match0_request_body**](docs/PostApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -*PostApi* | [**post_enum_with_true_does_not_match1_request_body**](docs/PostApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -*PostApi* | [**post_enums_in_properties_request_body**](docs/PostApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | -*PostApi* | [**post_forbidden_property_request_body**](docs/PostApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | -*PostApi* | [**post_hostname_format_request_body**](docs/PostApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | -*PostApi* | [**post_integer_type_matches_integers_request_body**](docs/PostApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -*PostApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](docs/PostApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -*PostApi* | [**post_invalid_string_value_for_default_request_body**](docs/PostApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | -*PostApi* | [**post_ipv4_format_request_body**](docs/PostApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | -*PostApi* | [**post_ipv6_format_request_body**](docs/PostApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | -*PostApi* | [**post_json_pointer_format_request_body**](docs/PostApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | -*PostApi* | [**post_maximum_validation_request_body**](docs/PostApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | -*PostApi* | [**post_maximum_validation_with_unsigned_integer_request_body**](docs/PostApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -*PostApi* | [**post_maxitems_validation_request_body**](docs/PostApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | -*PostApi* | [**post_maxlength_validation_request_body**](docs/PostApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | -*PostApi* | [**post_maxproperties0_means_the_object_is_empty_request_body**](docs/PostApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -*PostApi* | [**post_maxproperties_validation_request_body**](docs/PostApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | -*PostApi* | [**post_minimum_validation_request_body**](docs/PostApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | -*PostApi* | [**post_minimum_validation_with_signed_integer_request_body**](docs/PostApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -*PostApi* | [**post_minitems_validation_request_body**](docs/PostApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | -*PostApi* | [**post_minlength_validation_request_body**](docs/PostApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | -*PostApi* | [**post_minproperties_validation_request_body**](docs/PostApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | -*PostApi* | [**post_nested_allof_to_check_validation_semantics_request_body**](docs/PostApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -*PostApi* | [**post_nested_anyof_to_check_validation_semantics_request_body**](docs/PostApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -*PostApi* | [**post_nested_items_request_body**](docs/PostApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | -*PostApi* | [**post_nested_oneof_to_check_validation_semantics_request_body**](docs/PostApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -*PostApi* | [**post_not_more_complex_schema_request_body**](docs/PostApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | -*PostApi* | [**post_not_request_body**](docs/PostApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | -*PostApi* | [**post_nul_characters_in_strings_request_body**](docs/PostApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | -*PostApi* | [**post_null_type_matches_only_the_null_object_request_body**](docs/PostApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -*PostApi* | [**post_number_type_matches_numbers_request_body**](docs/PostApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | -*PostApi* | [**post_object_properties_validation_request_body**](docs/PostApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | -*PostApi* | [**post_object_type_matches_objects_request_body**](docs/PostApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | -*PostApi* | [**post_oneof_complex_types_request_body**](docs/PostApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | -*PostApi* | [**post_oneof_request_body**](docs/PostApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | -*PostApi* | [**post_oneof_with_base_schema_request_body**](docs/PostApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | -*PostApi* | [**post_oneof_with_empty_schema_request_body**](docs/PostApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | -*PostApi* | [**post_pattern_is_not_anchored_request_body**](docs/PostApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | -*PostApi* | [**post_pattern_validation_request_body**](docs/PostApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | -*PostApi* | [**post_properties_with_escaped_characters_request_body**](docs/PostApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -*PostApi* | [**post_property_named_ref_that_is_not_a_reference_request_body**](docs/PostApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -*PostApi* | [**post_ref_in_additionalproperties_request_body**](docs/PostApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | -*PostApi* | [**post_ref_in_allof_request_body**](docs/PostApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | -*PostApi* | [**post_ref_in_anyof_request_body**](docs/PostApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | -*PostApi* | [**post_ref_in_items_request_body**](docs/PostApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | -*PostApi* | [**post_ref_in_oneof_request_body**](docs/PostApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | -*PostApi* | [**post_ref_in_property_request_body**](docs/PostApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | -*PostApi* | [**post_required_default_validation_request_body**](docs/PostApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | -*PostApi* | [**post_required_validation_request_body**](docs/PostApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | -*PostApi* | [**post_required_with_empty_array_request_body**](docs/PostApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | -*PostApi* | [**post_simple_enum_validation_request_body**](docs/PostApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | -*PostApi* | [**post_string_type_matches_strings_request_body**](docs/PostApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | -*PostApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](docs/PostApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -*PostApi* | [**post_uniqueitems_false_validation_request_body**](docs/PostApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | -*PostApi* | [**post_uniqueitems_validation_request_body**](docs/PostApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | -*PostApi* | [**post_uri_format_request_body**](docs/PostApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | -*PostApi* | [**post_uri_reference_format_request_body**](docs/PostApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | -*PostApi* | [**post_uri_template_format_request_body**](docs/PostApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | -*RequestBodyApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](docs/RequestBodyApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -*RequestBodyApi* | [**post_additionalproperties_are_allowed_by_default_request_body**](docs/RequestBodyApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -*RequestBodyApi* | [**post_additionalproperties_can_exist_by_itself_request_body**](docs/RequestBodyApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -*RequestBodyApi* | [**post_additionalproperties_should_not_look_in_applicators_request_body**](docs/RequestBodyApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -*RequestBodyApi* | [**post_allof_combined_with_anyof_oneof_request_body**](docs/RequestBodyApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -*RequestBodyApi* | [**post_allof_request_body**](docs/RequestBodyApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | -*RequestBodyApi* | [**post_allof_simple_types_request_body**](docs/RequestBodyApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | -*RequestBodyApi* | [**post_allof_with_base_schema_request_body**](docs/RequestBodyApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | -*RequestBodyApi* | [**post_allof_with_one_empty_schema_request_body**](docs/RequestBodyApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | -*RequestBodyApi* | [**post_allof_with_the_first_empty_schema_request_body**](docs/RequestBodyApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -*RequestBodyApi* | [**post_allof_with_the_last_empty_schema_request_body**](docs/RequestBodyApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -*RequestBodyApi* | [**post_allof_with_two_empty_schemas_request_body**](docs/RequestBodyApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -*RequestBodyApi* | [**post_anyof_complex_types_request_body**](docs/RequestBodyApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | -*RequestBodyApi* | [**post_anyof_request_body**](docs/RequestBodyApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | -*RequestBodyApi* | [**post_anyof_with_base_schema_request_body**](docs/RequestBodyApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | -*RequestBodyApi* | [**post_anyof_with_one_empty_schema_request_body**](docs/RequestBodyApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -*RequestBodyApi* | [**post_array_type_matches_arrays_request_body**](docs/RequestBodyApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | -*RequestBodyApi* | [**post_boolean_type_matches_booleans_request_body**](docs/RequestBodyApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -*RequestBodyApi* | [**post_by_int_request_body**](docs/RequestBodyApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | -*RequestBodyApi* | [**post_by_number_request_body**](docs/RequestBodyApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | -*RequestBodyApi* | [**post_by_small_number_request_body**](docs/RequestBodyApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | -*RequestBodyApi* | [**post_date_time_format_request_body**](docs/RequestBodyApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | -*RequestBodyApi* | [**post_email_format_request_body**](docs/RequestBodyApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | -*RequestBodyApi* | [**post_enum_with0_does_not_match_false_request_body**](docs/RequestBodyApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -*RequestBodyApi* | [**post_enum_with1_does_not_match_true_request_body**](docs/RequestBodyApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -*RequestBodyApi* | [**post_enum_with_escaped_characters_request_body**](docs/RequestBodyApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | -*RequestBodyApi* | [**post_enum_with_false_does_not_match0_request_body**](docs/RequestBodyApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -*RequestBodyApi* | [**post_enum_with_true_does_not_match1_request_body**](docs/RequestBodyApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -*RequestBodyApi* | [**post_enums_in_properties_request_body**](docs/RequestBodyApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | -*RequestBodyApi* | [**post_forbidden_property_request_body**](docs/RequestBodyApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | -*RequestBodyApi* | [**post_hostname_format_request_body**](docs/RequestBodyApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | -*RequestBodyApi* | [**post_integer_type_matches_integers_request_body**](docs/RequestBodyApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -*RequestBodyApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](docs/RequestBodyApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -*RequestBodyApi* | [**post_invalid_string_value_for_default_request_body**](docs/RequestBodyApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | -*RequestBodyApi* | [**post_ipv4_format_request_body**](docs/RequestBodyApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | -*RequestBodyApi* | [**post_ipv6_format_request_body**](docs/RequestBodyApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | -*RequestBodyApi* | [**post_json_pointer_format_request_body**](docs/RequestBodyApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | -*RequestBodyApi* | [**post_maximum_validation_request_body**](docs/RequestBodyApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | -*RequestBodyApi* | [**post_maximum_validation_with_unsigned_integer_request_body**](docs/RequestBodyApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -*RequestBodyApi* | [**post_maxitems_validation_request_body**](docs/RequestBodyApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | -*RequestBodyApi* | [**post_maxlength_validation_request_body**](docs/RequestBodyApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | -*RequestBodyApi* | [**post_maxproperties0_means_the_object_is_empty_request_body**](docs/RequestBodyApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -*RequestBodyApi* | [**post_maxproperties_validation_request_body**](docs/RequestBodyApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | -*RequestBodyApi* | [**post_minimum_validation_request_body**](docs/RequestBodyApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | -*RequestBodyApi* | [**post_minimum_validation_with_signed_integer_request_body**](docs/RequestBodyApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -*RequestBodyApi* | [**post_minitems_validation_request_body**](docs/RequestBodyApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | -*RequestBodyApi* | [**post_minlength_validation_request_body**](docs/RequestBodyApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | -*RequestBodyApi* | [**post_minproperties_validation_request_body**](docs/RequestBodyApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | -*RequestBodyApi* | [**post_nested_allof_to_check_validation_semantics_request_body**](docs/RequestBodyApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -*RequestBodyApi* | [**post_nested_anyof_to_check_validation_semantics_request_body**](docs/RequestBodyApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -*RequestBodyApi* | [**post_nested_items_request_body**](docs/RequestBodyApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | -*RequestBodyApi* | [**post_nested_oneof_to_check_validation_semantics_request_body**](docs/RequestBodyApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -*RequestBodyApi* | [**post_not_more_complex_schema_request_body**](docs/RequestBodyApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | -*RequestBodyApi* | [**post_not_request_body**](docs/RequestBodyApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | -*RequestBodyApi* | [**post_nul_characters_in_strings_request_body**](docs/RequestBodyApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | -*RequestBodyApi* | [**post_null_type_matches_only_the_null_object_request_body**](docs/RequestBodyApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -*RequestBodyApi* | [**post_number_type_matches_numbers_request_body**](docs/RequestBodyApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | -*RequestBodyApi* | [**post_object_properties_validation_request_body**](docs/RequestBodyApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | -*RequestBodyApi* | [**post_object_type_matches_objects_request_body**](docs/RequestBodyApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | -*RequestBodyApi* | [**post_oneof_complex_types_request_body**](docs/RequestBodyApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | -*RequestBodyApi* | [**post_oneof_request_body**](docs/RequestBodyApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | -*RequestBodyApi* | [**post_oneof_with_base_schema_request_body**](docs/RequestBodyApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | -*RequestBodyApi* | [**post_oneof_with_empty_schema_request_body**](docs/RequestBodyApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | -*RequestBodyApi* | [**post_pattern_is_not_anchored_request_body**](docs/RequestBodyApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | -*RequestBodyApi* | [**post_pattern_validation_request_body**](docs/RequestBodyApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | -*RequestBodyApi* | [**post_properties_with_escaped_characters_request_body**](docs/RequestBodyApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -*RequestBodyApi* | [**post_property_named_ref_that_is_not_a_reference_request_body**](docs/RequestBodyApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -*RequestBodyApi* | [**post_ref_in_additionalproperties_request_body**](docs/RequestBodyApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | -*RequestBodyApi* | [**post_ref_in_allof_request_body**](docs/RequestBodyApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | -*RequestBodyApi* | [**post_ref_in_anyof_request_body**](docs/RequestBodyApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | -*RequestBodyApi* | [**post_ref_in_items_request_body**](docs/RequestBodyApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | -*RequestBodyApi* | [**post_ref_in_oneof_request_body**](docs/RequestBodyApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | -*RequestBodyApi* | [**post_ref_in_property_request_body**](docs/RequestBodyApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | -*RequestBodyApi* | [**post_required_default_validation_request_body**](docs/RequestBodyApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | -*RequestBodyApi* | [**post_required_validation_request_body**](docs/RequestBodyApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | -*RequestBodyApi* | [**post_required_with_empty_array_request_body**](docs/RequestBodyApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | -*RequestBodyApi* | [**post_simple_enum_validation_request_body**](docs/RequestBodyApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | -*RequestBodyApi* | [**post_string_type_matches_strings_request_body**](docs/RequestBodyApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | -*RequestBodyApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](docs/RequestBodyApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -*RequestBodyApi* | [**post_uniqueitems_false_validation_request_body**](docs/RequestBodyApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | -*RequestBodyApi* | [**post_uniqueitems_validation_request_body**](docs/RequestBodyApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | -*RequestBodyApi* | [**post_uri_format_request_body**](docs/RequestBodyApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | -*RequestBodyApi* | [**post_uri_reference_format_request_body**](docs/RequestBodyApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | -*RequestBodyApi* | [**post_uri_template_format_request_body**](docs/RequestBodyApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | +*ContentTypeJsonApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](docs/ContentTypeJsonApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | +*ContentTypeJsonApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_additionalproperties_are_allowed_by_default_request_body**](docs/ContentTypeJsonApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | +*ContentTypeJsonApi* | [**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_additionalproperties_can_exist_by_itself_request_body**](docs/ContentTypeJsonApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | +*ContentTypeJsonApi* | [**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_additionalproperties_should_not_look_in_applicators_request_body**](docs/ContentTypeJsonApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | +*ContentTypeJsonApi* | [**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_allof_combined_with_anyof_oneof_request_body**](docs/ContentTypeJsonApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | +*ContentTypeJsonApi* | [**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **POST** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_allof_request_body**](docs/ContentTypeJsonApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | +*ContentTypeJsonApi* | [**post_allof_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_allof_response_body_for_content_types) | **POST** /responseBody/postAllofResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_allof_simple_types_request_body**](docs/ContentTypeJsonApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | +*ContentTypeJsonApi* | [**post_allof_simple_types_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_allof_simple_types_response_body_for_content_types) | **POST** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_allof_with_base_schema_request_body**](docs/ContentTypeJsonApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | +*ContentTypeJsonApi* | [**post_allof_with_base_schema_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_allof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_allof_with_one_empty_schema_request_body**](docs/ContentTypeJsonApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | +*ContentTypeJsonApi* | [**post_allof_with_one_empty_schema_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_allof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_allof_with_the_first_empty_schema_request_body**](docs/ContentTypeJsonApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | +*ContentTypeJsonApi* | [**post_allof_with_the_first_empty_schema_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_allof_with_the_last_empty_schema_request_body**](docs/ContentTypeJsonApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | +*ContentTypeJsonApi* | [**post_allof_with_the_last_empty_schema_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_allof_with_two_empty_schemas_request_body**](docs/ContentTypeJsonApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | +*ContentTypeJsonApi* | [**post_allof_with_two_empty_schemas_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_allof_with_two_empty_schemas_response_body_for_content_types) | **POST** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_anyof_complex_types_request_body**](docs/ContentTypeJsonApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | +*ContentTypeJsonApi* | [**post_anyof_complex_types_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_anyof_complex_types_response_body_for_content_types) | **POST** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_anyof_request_body**](docs/ContentTypeJsonApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | +*ContentTypeJsonApi* | [**post_anyof_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_anyof_response_body_for_content_types) | **POST** /responseBody/postAnyofResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_anyof_with_base_schema_request_body**](docs/ContentTypeJsonApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | +*ContentTypeJsonApi* | [**post_anyof_with_base_schema_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_anyof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_anyof_with_one_empty_schema_request_body**](docs/ContentTypeJsonApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | +*ContentTypeJsonApi* | [**post_anyof_with_one_empty_schema_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_anyof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_array_type_matches_arrays_request_body**](docs/ContentTypeJsonApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | +*ContentTypeJsonApi* | [**post_array_type_matches_arrays_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_array_type_matches_arrays_response_body_for_content_types) | **POST** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_boolean_type_matches_booleans_request_body**](docs/ContentTypeJsonApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | +*ContentTypeJsonApi* | [**post_boolean_type_matches_booleans_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_boolean_type_matches_booleans_response_body_for_content_types) | **POST** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_by_int_request_body**](docs/ContentTypeJsonApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | +*ContentTypeJsonApi* | [**post_by_int_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_by_int_response_body_for_content_types) | **POST** /responseBody/postByIntResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_by_number_request_body**](docs/ContentTypeJsonApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | +*ContentTypeJsonApi* | [**post_by_number_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_by_number_response_body_for_content_types) | **POST** /responseBody/postByNumberResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_by_small_number_request_body**](docs/ContentTypeJsonApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | +*ContentTypeJsonApi* | [**post_by_small_number_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_by_small_number_response_body_for_content_types) | **POST** /responseBody/postBySmallNumberResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_date_time_format_request_body**](docs/ContentTypeJsonApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | +*ContentTypeJsonApi* | [**post_date_time_format_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_date_time_format_response_body_for_content_types) | **POST** /responseBody/postDateTimeFormatResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_email_format_request_body**](docs/ContentTypeJsonApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | +*ContentTypeJsonApi* | [**post_email_format_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_email_format_response_body_for_content_types) | **POST** /responseBody/postEmailFormatResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_enum_with0_does_not_match_false_request_body**](docs/ContentTypeJsonApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | +*ContentTypeJsonApi* | [**post_enum_with0_does_not_match_false_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_enum_with0_does_not_match_false_response_body_for_content_types) | **POST** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_enum_with1_does_not_match_true_request_body**](docs/ContentTypeJsonApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | +*ContentTypeJsonApi* | [**post_enum_with1_does_not_match_true_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_enum_with1_does_not_match_true_response_body_for_content_types) | **POST** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_enum_with_escaped_characters_request_body**](docs/ContentTypeJsonApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | +*ContentTypeJsonApi* | [**post_enum_with_escaped_characters_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_enum_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_enum_with_false_does_not_match0_request_body**](docs/ContentTypeJsonApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | +*ContentTypeJsonApi* | [**post_enum_with_false_does_not_match0_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_enum_with_false_does_not_match0_response_body_for_content_types) | **POST** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_enum_with_true_does_not_match1_request_body**](docs/ContentTypeJsonApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | +*ContentTypeJsonApi* | [**post_enum_with_true_does_not_match1_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_enum_with_true_does_not_match1_response_body_for_content_types) | **POST** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_enums_in_properties_request_body**](docs/ContentTypeJsonApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | +*ContentTypeJsonApi* | [**post_enums_in_properties_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_enums_in_properties_response_body_for_content_types) | **POST** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_forbidden_property_request_body**](docs/ContentTypeJsonApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | +*ContentTypeJsonApi* | [**post_forbidden_property_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_forbidden_property_response_body_for_content_types) | **POST** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_hostname_format_request_body**](docs/ContentTypeJsonApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | +*ContentTypeJsonApi* | [**post_hostname_format_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_hostname_format_response_body_for_content_types) | **POST** /responseBody/postHostnameFormatResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_integer_type_matches_integers_request_body**](docs/ContentTypeJsonApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | +*ContentTypeJsonApi* | [**post_integer_type_matches_integers_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_integer_type_matches_integers_response_body_for_content_types) | **POST** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](docs/ContentTypeJsonApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | +*ContentTypeJsonApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **POST** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_invalid_string_value_for_default_request_body**](docs/ContentTypeJsonApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | +*ContentTypeJsonApi* | [**post_invalid_string_value_for_default_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_invalid_string_value_for_default_response_body_for_content_types) | **POST** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_ipv4_format_request_body**](docs/ContentTypeJsonApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | +*ContentTypeJsonApi* | [**post_ipv4_format_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_ipv4_format_response_body_for_content_types) | **POST** /responseBody/postIpv4FormatResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_ipv6_format_request_body**](docs/ContentTypeJsonApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | +*ContentTypeJsonApi* | [**post_ipv6_format_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_ipv6_format_response_body_for_content_types) | **POST** /responseBody/postIpv6FormatResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_json_pointer_format_request_body**](docs/ContentTypeJsonApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | +*ContentTypeJsonApi* | [**post_json_pointer_format_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_json_pointer_format_response_body_for_content_types) | **POST** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_maximum_validation_request_body**](docs/ContentTypeJsonApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | +*ContentTypeJsonApi* | [**post_maximum_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_maximum_validation_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_maximum_validation_with_unsigned_integer_request_body**](docs/ContentTypeJsonApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | +*ContentTypeJsonApi* | [**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_maxitems_validation_request_body**](docs/ContentTypeJsonApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | +*ContentTypeJsonApi* | [**post_maxitems_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_maxitems_validation_response_body_for_content_types) | **POST** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_maxlength_validation_request_body**](docs/ContentTypeJsonApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | +*ContentTypeJsonApi* | [**post_maxlength_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_maxlength_validation_response_body_for_content_types) | **POST** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_maxproperties0_means_the_object_is_empty_request_body**](docs/ContentTypeJsonApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | +*ContentTypeJsonApi* | [**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **POST** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_maxproperties_validation_request_body**](docs/ContentTypeJsonApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | +*ContentTypeJsonApi* | [**post_maxproperties_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_maxproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_minimum_validation_request_body**](docs/ContentTypeJsonApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | +*ContentTypeJsonApi* | [**post_minimum_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_minimum_validation_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_minimum_validation_with_signed_integer_request_body**](docs/ContentTypeJsonApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | +*ContentTypeJsonApi* | [**post_minimum_validation_with_signed_integer_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_minitems_validation_request_body**](docs/ContentTypeJsonApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | +*ContentTypeJsonApi* | [**post_minitems_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_minitems_validation_response_body_for_content_types) | **POST** /responseBody/postMinitemsValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_minlength_validation_request_body**](docs/ContentTypeJsonApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | +*ContentTypeJsonApi* | [**post_minlength_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_minlength_validation_response_body_for_content_types) | **POST** /responseBody/postMinlengthValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_minproperties_validation_request_body**](docs/ContentTypeJsonApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | +*ContentTypeJsonApi* | [**post_minproperties_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_minproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_nested_allof_to_check_validation_semantics_request_body**](docs/ContentTypeJsonApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | +*ContentTypeJsonApi* | [**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_nested_anyof_to_check_validation_semantics_request_body**](docs/ContentTypeJsonApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | +*ContentTypeJsonApi* | [**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_nested_items_request_body**](docs/ContentTypeJsonApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | +*ContentTypeJsonApi* | [**post_nested_items_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_nested_items_response_body_for_content_types) | **POST** /responseBody/postNestedItemsResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_nested_oneof_to_check_validation_semantics_request_body**](docs/ContentTypeJsonApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | +*ContentTypeJsonApi* | [**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_not_more_complex_schema_request_body**](docs/ContentTypeJsonApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | +*ContentTypeJsonApi* | [**post_not_more_complex_schema_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_not_more_complex_schema_response_body_for_content_types) | **POST** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_not_request_body**](docs/ContentTypeJsonApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | +*ContentTypeJsonApi* | [**post_not_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_not_response_body_for_content_types) | **POST** /responseBody/postNotResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_nul_characters_in_strings_request_body**](docs/ContentTypeJsonApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | +*ContentTypeJsonApi* | [**post_nul_characters_in_strings_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_nul_characters_in_strings_response_body_for_content_types) | **POST** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_null_type_matches_only_the_null_object_request_body**](docs/ContentTypeJsonApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | +*ContentTypeJsonApi* | [**post_null_type_matches_only_the_null_object_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **POST** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_number_type_matches_numbers_request_body**](docs/ContentTypeJsonApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | +*ContentTypeJsonApi* | [**post_number_type_matches_numbers_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_number_type_matches_numbers_response_body_for_content_types) | **POST** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_object_properties_validation_request_body**](docs/ContentTypeJsonApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | +*ContentTypeJsonApi* | [**post_object_properties_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_object_properties_validation_response_body_for_content_types) | **POST** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_object_type_matches_objects_request_body**](docs/ContentTypeJsonApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | +*ContentTypeJsonApi* | [**post_object_type_matches_objects_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_object_type_matches_objects_response_body_for_content_types) | **POST** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_oneof_complex_types_request_body**](docs/ContentTypeJsonApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | +*ContentTypeJsonApi* | [**post_oneof_complex_types_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_oneof_complex_types_response_body_for_content_types) | **POST** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_oneof_request_body**](docs/ContentTypeJsonApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | +*ContentTypeJsonApi* | [**post_oneof_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_oneof_response_body_for_content_types) | **POST** /responseBody/postOneofResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_oneof_with_base_schema_request_body**](docs/ContentTypeJsonApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | +*ContentTypeJsonApi* | [**post_oneof_with_base_schema_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_oneof_with_empty_schema_request_body**](docs/ContentTypeJsonApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | +*ContentTypeJsonApi* | [**post_oneof_with_empty_schema_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_pattern_is_not_anchored_request_body**](docs/ContentTypeJsonApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | +*ContentTypeJsonApi* | [**post_pattern_is_not_anchored_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **POST** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_pattern_validation_request_body**](docs/ContentTypeJsonApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | +*ContentTypeJsonApi* | [**post_pattern_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_pattern_validation_response_body_for_content_types) | **POST** /responseBody/postPatternValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_properties_with_escaped_characters_request_body**](docs/ContentTypeJsonApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | +*ContentTypeJsonApi* | [**post_properties_with_escaped_characters_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_properties_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_property_named_ref_that_is_not_a_reference_request_body**](docs/ContentTypeJsonApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | +*ContentTypeJsonApi* | [**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **POST** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_ref_in_additionalproperties_request_body**](docs/ContentTypeJsonApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | +*ContentTypeJsonApi* | [**post_ref_in_additionalproperties_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_ref_in_additionalproperties_response_body_for_content_types) | **POST** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_ref_in_allof_request_body**](docs/ContentTypeJsonApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | +*ContentTypeJsonApi* | [**post_ref_in_allof_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_ref_in_allof_response_body_for_content_types) | **POST** /responseBody/postRefInAllofResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_ref_in_anyof_request_body**](docs/ContentTypeJsonApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | +*ContentTypeJsonApi* | [**post_ref_in_anyof_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_ref_in_anyof_response_body_for_content_types) | **POST** /responseBody/postRefInAnyofResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_ref_in_items_request_body**](docs/ContentTypeJsonApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | +*ContentTypeJsonApi* | [**post_ref_in_items_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_ref_in_items_response_body_for_content_types) | **POST** /responseBody/postRefInItemsResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_ref_in_oneof_request_body**](docs/ContentTypeJsonApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | +*ContentTypeJsonApi* | [**post_ref_in_oneof_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_ref_in_oneof_response_body_for_content_types) | **POST** /responseBody/postRefInOneofResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_ref_in_property_request_body**](docs/ContentTypeJsonApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | +*ContentTypeJsonApi* | [**post_ref_in_property_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_ref_in_property_response_body_for_content_types) | **POST** /responseBody/postRefInPropertyResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_required_default_validation_request_body**](docs/ContentTypeJsonApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | +*ContentTypeJsonApi* | [**post_required_default_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_required_default_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_required_validation_request_body**](docs/ContentTypeJsonApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | +*ContentTypeJsonApi* | [**post_required_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_required_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_required_with_empty_array_request_body**](docs/ContentTypeJsonApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | +*ContentTypeJsonApi* | [**post_required_with_empty_array_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_required_with_empty_array_response_body_for_content_types) | **POST** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_simple_enum_validation_request_body**](docs/ContentTypeJsonApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | +*ContentTypeJsonApi* | [**post_simple_enum_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_simple_enum_validation_response_body_for_content_types) | **POST** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_string_type_matches_strings_request_body**](docs/ContentTypeJsonApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | +*ContentTypeJsonApi* | [**post_string_type_matches_strings_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_string_type_matches_strings_response_body_for_content_types) | **POST** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](docs/ContentTypeJsonApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | +*ContentTypeJsonApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **POST** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_uniqueitems_false_validation_request_body**](docs/ContentTypeJsonApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | +*ContentTypeJsonApi* | [**post_uniqueitems_false_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_uniqueitems_false_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_uniqueitems_validation_request_body**](docs/ContentTypeJsonApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | +*ContentTypeJsonApi* | [**post_uniqueitems_validation_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_uniqueitems_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_uri_format_request_body**](docs/ContentTypeJsonApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | +*ContentTypeJsonApi* | [**post_uri_format_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_uri_format_response_body_for_content_types) | **POST** /responseBody/postUriFormatResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_uri_reference_format_request_body**](docs/ContentTypeJsonApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | +*ContentTypeJsonApi* | [**post_uri_reference_format_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_uri_reference_format_response_body_for_content_types) | **POST** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | +*ContentTypeJsonApi* | [**post_uri_template_format_request_body**](docs/ContentTypeJsonApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | +*ContentTypeJsonApi* | [**post_uri_template_format_response_body_for_content_types**](docs/ContentTypeJsonApi.md#post_uri_template_format_response_body_for_content_types) | **POST** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | +*OperationRequestBodyApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](docs/OperationRequestBodyApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | +*OperationRequestBodyApi* | [**post_additionalproperties_are_allowed_by_default_request_body**](docs/OperationRequestBodyApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | +*OperationRequestBodyApi* | [**post_additionalproperties_can_exist_by_itself_request_body**](docs/OperationRequestBodyApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | +*OperationRequestBodyApi* | [**post_additionalproperties_should_not_look_in_applicators_request_body**](docs/OperationRequestBodyApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | +*OperationRequestBodyApi* | [**post_allof_combined_with_anyof_oneof_request_body**](docs/OperationRequestBodyApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | +*OperationRequestBodyApi* | [**post_allof_request_body**](docs/OperationRequestBodyApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | +*OperationRequestBodyApi* | [**post_allof_simple_types_request_body**](docs/OperationRequestBodyApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | +*OperationRequestBodyApi* | [**post_allof_with_base_schema_request_body**](docs/OperationRequestBodyApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | +*OperationRequestBodyApi* | [**post_allof_with_one_empty_schema_request_body**](docs/OperationRequestBodyApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | +*OperationRequestBodyApi* | [**post_allof_with_the_first_empty_schema_request_body**](docs/OperationRequestBodyApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | +*OperationRequestBodyApi* | [**post_allof_with_the_last_empty_schema_request_body**](docs/OperationRequestBodyApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | +*OperationRequestBodyApi* | [**post_allof_with_two_empty_schemas_request_body**](docs/OperationRequestBodyApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | +*OperationRequestBodyApi* | [**post_anyof_complex_types_request_body**](docs/OperationRequestBodyApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | +*OperationRequestBodyApi* | [**post_anyof_request_body**](docs/OperationRequestBodyApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | +*OperationRequestBodyApi* | [**post_anyof_with_base_schema_request_body**](docs/OperationRequestBodyApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | +*OperationRequestBodyApi* | [**post_anyof_with_one_empty_schema_request_body**](docs/OperationRequestBodyApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | +*OperationRequestBodyApi* | [**post_array_type_matches_arrays_request_body**](docs/OperationRequestBodyApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | +*OperationRequestBodyApi* | [**post_boolean_type_matches_booleans_request_body**](docs/OperationRequestBodyApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | +*OperationRequestBodyApi* | [**post_by_int_request_body**](docs/OperationRequestBodyApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | +*OperationRequestBodyApi* | [**post_by_number_request_body**](docs/OperationRequestBodyApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | +*OperationRequestBodyApi* | [**post_by_small_number_request_body**](docs/OperationRequestBodyApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | +*OperationRequestBodyApi* | [**post_date_time_format_request_body**](docs/OperationRequestBodyApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | +*OperationRequestBodyApi* | [**post_email_format_request_body**](docs/OperationRequestBodyApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | +*OperationRequestBodyApi* | [**post_enum_with0_does_not_match_false_request_body**](docs/OperationRequestBodyApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | +*OperationRequestBodyApi* | [**post_enum_with1_does_not_match_true_request_body**](docs/OperationRequestBodyApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | +*OperationRequestBodyApi* | [**post_enum_with_escaped_characters_request_body**](docs/OperationRequestBodyApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | +*OperationRequestBodyApi* | [**post_enum_with_false_does_not_match0_request_body**](docs/OperationRequestBodyApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | +*OperationRequestBodyApi* | [**post_enum_with_true_does_not_match1_request_body**](docs/OperationRequestBodyApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | +*OperationRequestBodyApi* | [**post_enums_in_properties_request_body**](docs/OperationRequestBodyApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | +*OperationRequestBodyApi* | [**post_forbidden_property_request_body**](docs/OperationRequestBodyApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | +*OperationRequestBodyApi* | [**post_hostname_format_request_body**](docs/OperationRequestBodyApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | +*OperationRequestBodyApi* | [**post_integer_type_matches_integers_request_body**](docs/OperationRequestBodyApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | +*OperationRequestBodyApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](docs/OperationRequestBodyApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | +*OperationRequestBodyApi* | [**post_invalid_string_value_for_default_request_body**](docs/OperationRequestBodyApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | +*OperationRequestBodyApi* | [**post_ipv4_format_request_body**](docs/OperationRequestBodyApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | +*OperationRequestBodyApi* | [**post_ipv6_format_request_body**](docs/OperationRequestBodyApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | +*OperationRequestBodyApi* | [**post_json_pointer_format_request_body**](docs/OperationRequestBodyApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | +*OperationRequestBodyApi* | [**post_maximum_validation_request_body**](docs/OperationRequestBodyApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | +*OperationRequestBodyApi* | [**post_maximum_validation_with_unsigned_integer_request_body**](docs/OperationRequestBodyApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | +*OperationRequestBodyApi* | [**post_maxitems_validation_request_body**](docs/OperationRequestBodyApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | +*OperationRequestBodyApi* | [**post_maxlength_validation_request_body**](docs/OperationRequestBodyApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | +*OperationRequestBodyApi* | [**post_maxproperties0_means_the_object_is_empty_request_body**](docs/OperationRequestBodyApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | +*OperationRequestBodyApi* | [**post_maxproperties_validation_request_body**](docs/OperationRequestBodyApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | +*OperationRequestBodyApi* | [**post_minimum_validation_request_body**](docs/OperationRequestBodyApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | +*OperationRequestBodyApi* | [**post_minimum_validation_with_signed_integer_request_body**](docs/OperationRequestBodyApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | +*OperationRequestBodyApi* | [**post_minitems_validation_request_body**](docs/OperationRequestBodyApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | +*OperationRequestBodyApi* | [**post_minlength_validation_request_body**](docs/OperationRequestBodyApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | +*OperationRequestBodyApi* | [**post_minproperties_validation_request_body**](docs/OperationRequestBodyApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | +*OperationRequestBodyApi* | [**post_nested_allof_to_check_validation_semantics_request_body**](docs/OperationRequestBodyApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | +*OperationRequestBodyApi* | [**post_nested_anyof_to_check_validation_semantics_request_body**](docs/OperationRequestBodyApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | +*OperationRequestBodyApi* | [**post_nested_items_request_body**](docs/OperationRequestBodyApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | +*OperationRequestBodyApi* | [**post_nested_oneof_to_check_validation_semantics_request_body**](docs/OperationRequestBodyApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | +*OperationRequestBodyApi* | [**post_not_more_complex_schema_request_body**](docs/OperationRequestBodyApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | +*OperationRequestBodyApi* | [**post_not_request_body**](docs/OperationRequestBodyApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | +*OperationRequestBodyApi* | [**post_nul_characters_in_strings_request_body**](docs/OperationRequestBodyApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | +*OperationRequestBodyApi* | [**post_null_type_matches_only_the_null_object_request_body**](docs/OperationRequestBodyApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | +*OperationRequestBodyApi* | [**post_number_type_matches_numbers_request_body**](docs/OperationRequestBodyApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | +*OperationRequestBodyApi* | [**post_object_properties_validation_request_body**](docs/OperationRequestBodyApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | +*OperationRequestBodyApi* | [**post_object_type_matches_objects_request_body**](docs/OperationRequestBodyApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | +*OperationRequestBodyApi* | [**post_oneof_complex_types_request_body**](docs/OperationRequestBodyApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | +*OperationRequestBodyApi* | [**post_oneof_request_body**](docs/OperationRequestBodyApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | +*OperationRequestBodyApi* | [**post_oneof_with_base_schema_request_body**](docs/OperationRequestBodyApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | +*OperationRequestBodyApi* | [**post_oneof_with_empty_schema_request_body**](docs/OperationRequestBodyApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | +*OperationRequestBodyApi* | [**post_pattern_is_not_anchored_request_body**](docs/OperationRequestBodyApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | +*OperationRequestBodyApi* | [**post_pattern_validation_request_body**](docs/OperationRequestBodyApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | +*OperationRequestBodyApi* | [**post_properties_with_escaped_characters_request_body**](docs/OperationRequestBodyApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | +*OperationRequestBodyApi* | [**post_property_named_ref_that_is_not_a_reference_request_body**](docs/OperationRequestBodyApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | +*OperationRequestBodyApi* | [**post_ref_in_additionalproperties_request_body**](docs/OperationRequestBodyApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | +*OperationRequestBodyApi* | [**post_ref_in_allof_request_body**](docs/OperationRequestBodyApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | +*OperationRequestBodyApi* | [**post_ref_in_anyof_request_body**](docs/OperationRequestBodyApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | +*OperationRequestBodyApi* | [**post_ref_in_items_request_body**](docs/OperationRequestBodyApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | +*OperationRequestBodyApi* | [**post_ref_in_oneof_request_body**](docs/OperationRequestBodyApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | +*OperationRequestBodyApi* | [**post_ref_in_property_request_body**](docs/OperationRequestBodyApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | +*OperationRequestBodyApi* | [**post_required_default_validation_request_body**](docs/OperationRequestBodyApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | +*OperationRequestBodyApi* | [**post_required_validation_request_body**](docs/OperationRequestBodyApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | +*OperationRequestBodyApi* | [**post_required_with_empty_array_request_body**](docs/OperationRequestBodyApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | +*OperationRequestBodyApi* | [**post_simple_enum_validation_request_body**](docs/OperationRequestBodyApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | +*OperationRequestBodyApi* | [**post_string_type_matches_strings_request_body**](docs/OperationRequestBodyApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | +*OperationRequestBodyApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](docs/OperationRequestBodyApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | +*OperationRequestBodyApi* | [**post_uniqueitems_false_validation_request_body**](docs/OperationRequestBodyApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | +*OperationRequestBodyApi* | [**post_uniqueitems_validation_request_body**](docs/OperationRequestBodyApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | +*OperationRequestBodyApi* | [**post_uri_format_request_body**](docs/OperationRequestBodyApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | +*OperationRequestBodyApi* | [**post_uri_reference_format_request_body**](docs/OperationRequestBodyApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | +*OperationRequestBodyApi* | [**post_uri_template_format_request_body**](docs/OperationRequestBodyApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | +*PathPostApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](docs/PathPostApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | +*PathPostApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](docs/PathPostApi.md#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | +*PathPostApi* | [**post_additionalproperties_are_allowed_by_default_request_body**](docs/PathPostApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | +*PathPostApi* | [**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](docs/PathPostApi.md#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | +*PathPostApi* | [**post_additionalproperties_can_exist_by_itself_request_body**](docs/PathPostApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | +*PathPostApi* | [**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](docs/PathPostApi.md#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | +*PathPostApi* | [**post_additionalproperties_should_not_look_in_applicators_request_body**](docs/PathPostApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | +*PathPostApi* | [**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](docs/PathPostApi.md#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | +*PathPostApi* | [**post_allof_combined_with_anyof_oneof_request_body**](docs/PathPostApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | +*PathPostApi* | [**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](docs/PathPostApi.md#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **POST** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | +*PathPostApi* | [**post_allof_request_body**](docs/PathPostApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | +*PathPostApi* | [**post_allof_response_body_for_content_types**](docs/PathPostApi.md#post_allof_response_body_for_content_types) | **POST** /responseBody/postAllofResponseBodyForContentTypes | +*PathPostApi* | [**post_allof_simple_types_request_body**](docs/PathPostApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | +*PathPostApi* | [**post_allof_simple_types_response_body_for_content_types**](docs/PathPostApi.md#post_allof_simple_types_response_body_for_content_types) | **POST** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | +*PathPostApi* | [**post_allof_with_base_schema_request_body**](docs/PathPostApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | +*PathPostApi* | [**post_allof_with_base_schema_response_body_for_content_types**](docs/PathPostApi.md#post_allof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | +*PathPostApi* | [**post_allof_with_one_empty_schema_request_body**](docs/PathPostApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | +*PathPostApi* | [**post_allof_with_one_empty_schema_response_body_for_content_types**](docs/PathPostApi.md#post_allof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | +*PathPostApi* | [**post_allof_with_the_first_empty_schema_request_body**](docs/PathPostApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | +*PathPostApi* | [**post_allof_with_the_first_empty_schema_response_body_for_content_types**](docs/PathPostApi.md#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | +*PathPostApi* | [**post_allof_with_the_last_empty_schema_request_body**](docs/PathPostApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | +*PathPostApi* | [**post_allof_with_the_last_empty_schema_response_body_for_content_types**](docs/PathPostApi.md#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | +*PathPostApi* | [**post_allof_with_two_empty_schemas_request_body**](docs/PathPostApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | +*PathPostApi* | [**post_allof_with_two_empty_schemas_response_body_for_content_types**](docs/PathPostApi.md#post_allof_with_two_empty_schemas_response_body_for_content_types) | **POST** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | +*PathPostApi* | [**post_anyof_complex_types_request_body**](docs/PathPostApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | +*PathPostApi* | [**post_anyof_complex_types_response_body_for_content_types**](docs/PathPostApi.md#post_anyof_complex_types_response_body_for_content_types) | **POST** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | +*PathPostApi* | [**post_anyof_request_body**](docs/PathPostApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | +*PathPostApi* | [**post_anyof_response_body_for_content_types**](docs/PathPostApi.md#post_anyof_response_body_for_content_types) | **POST** /responseBody/postAnyofResponseBodyForContentTypes | +*PathPostApi* | [**post_anyof_with_base_schema_request_body**](docs/PathPostApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | +*PathPostApi* | [**post_anyof_with_base_schema_response_body_for_content_types**](docs/PathPostApi.md#post_anyof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | +*PathPostApi* | [**post_anyof_with_one_empty_schema_request_body**](docs/PathPostApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | +*PathPostApi* | [**post_anyof_with_one_empty_schema_response_body_for_content_types**](docs/PathPostApi.md#post_anyof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | +*PathPostApi* | [**post_array_type_matches_arrays_request_body**](docs/PathPostApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | +*PathPostApi* | [**post_array_type_matches_arrays_response_body_for_content_types**](docs/PathPostApi.md#post_array_type_matches_arrays_response_body_for_content_types) | **POST** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | +*PathPostApi* | [**post_boolean_type_matches_booleans_request_body**](docs/PathPostApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | +*PathPostApi* | [**post_boolean_type_matches_booleans_response_body_for_content_types**](docs/PathPostApi.md#post_boolean_type_matches_booleans_response_body_for_content_types) | **POST** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | +*PathPostApi* | [**post_by_int_request_body**](docs/PathPostApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | +*PathPostApi* | [**post_by_int_response_body_for_content_types**](docs/PathPostApi.md#post_by_int_response_body_for_content_types) | **POST** /responseBody/postByIntResponseBodyForContentTypes | +*PathPostApi* | [**post_by_number_request_body**](docs/PathPostApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | +*PathPostApi* | [**post_by_number_response_body_for_content_types**](docs/PathPostApi.md#post_by_number_response_body_for_content_types) | **POST** /responseBody/postByNumberResponseBodyForContentTypes | +*PathPostApi* | [**post_by_small_number_request_body**](docs/PathPostApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | +*PathPostApi* | [**post_by_small_number_response_body_for_content_types**](docs/PathPostApi.md#post_by_small_number_response_body_for_content_types) | **POST** /responseBody/postBySmallNumberResponseBodyForContentTypes | +*PathPostApi* | [**post_date_time_format_request_body**](docs/PathPostApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | +*PathPostApi* | [**post_date_time_format_response_body_for_content_types**](docs/PathPostApi.md#post_date_time_format_response_body_for_content_types) | **POST** /responseBody/postDateTimeFormatResponseBodyForContentTypes | +*PathPostApi* | [**post_email_format_request_body**](docs/PathPostApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | +*PathPostApi* | [**post_email_format_response_body_for_content_types**](docs/PathPostApi.md#post_email_format_response_body_for_content_types) | **POST** /responseBody/postEmailFormatResponseBodyForContentTypes | +*PathPostApi* | [**post_enum_with0_does_not_match_false_request_body**](docs/PathPostApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | +*PathPostApi* | [**post_enum_with0_does_not_match_false_response_body_for_content_types**](docs/PathPostApi.md#post_enum_with0_does_not_match_false_response_body_for_content_types) | **POST** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | +*PathPostApi* | [**post_enum_with1_does_not_match_true_request_body**](docs/PathPostApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | +*PathPostApi* | [**post_enum_with1_does_not_match_true_response_body_for_content_types**](docs/PathPostApi.md#post_enum_with1_does_not_match_true_response_body_for_content_types) | **POST** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | +*PathPostApi* | [**post_enum_with_escaped_characters_request_body**](docs/PathPostApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | +*PathPostApi* | [**post_enum_with_escaped_characters_response_body_for_content_types**](docs/PathPostApi.md#post_enum_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | +*PathPostApi* | [**post_enum_with_false_does_not_match0_request_body**](docs/PathPostApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | +*PathPostApi* | [**post_enum_with_false_does_not_match0_response_body_for_content_types**](docs/PathPostApi.md#post_enum_with_false_does_not_match0_response_body_for_content_types) | **POST** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | +*PathPostApi* | [**post_enum_with_true_does_not_match1_request_body**](docs/PathPostApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | +*PathPostApi* | [**post_enum_with_true_does_not_match1_response_body_for_content_types**](docs/PathPostApi.md#post_enum_with_true_does_not_match1_response_body_for_content_types) | **POST** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | +*PathPostApi* | [**post_enums_in_properties_request_body**](docs/PathPostApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | +*PathPostApi* | [**post_enums_in_properties_response_body_for_content_types**](docs/PathPostApi.md#post_enums_in_properties_response_body_for_content_types) | **POST** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | +*PathPostApi* | [**post_forbidden_property_request_body**](docs/PathPostApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | +*PathPostApi* | [**post_forbidden_property_response_body_for_content_types**](docs/PathPostApi.md#post_forbidden_property_response_body_for_content_types) | **POST** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | +*PathPostApi* | [**post_hostname_format_request_body**](docs/PathPostApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | +*PathPostApi* | [**post_hostname_format_response_body_for_content_types**](docs/PathPostApi.md#post_hostname_format_response_body_for_content_types) | **POST** /responseBody/postHostnameFormatResponseBodyForContentTypes | +*PathPostApi* | [**post_integer_type_matches_integers_request_body**](docs/PathPostApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | +*PathPostApi* | [**post_integer_type_matches_integers_response_body_for_content_types**](docs/PathPostApi.md#post_integer_type_matches_integers_response_body_for_content_types) | **POST** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | +*PathPostApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](docs/PathPostApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | +*PathPostApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](docs/PathPostApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **POST** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | +*PathPostApi* | [**post_invalid_string_value_for_default_request_body**](docs/PathPostApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | +*PathPostApi* | [**post_invalid_string_value_for_default_response_body_for_content_types**](docs/PathPostApi.md#post_invalid_string_value_for_default_response_body_for_content_types) | **POST** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | +*PathPostApi* | [**post_ipv4_format_request_body**](docs/PathPostApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | +*PathPostApi* | [**post_ipv4_format_response_body_for_content_types**](docs/PathPostApi.md#post_ipv4_format_response_body_for_content_types) | **POST** /responseBody/postIpv4FormatResponseBodyForContentTypes | +*PathPostApi* | [**post_ipv6_format_request_body**](docs/PathPostApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | +*PathPostApi* | [**post_ipv6_format_response_body_for_content_types**](docs/PathPostApi.md#post_ipv6_format_response_body_for_content_types) | **POST** /responseBody/postIpv6FormatResponseBodyForContentTypes | +*PathPostApi* | [**post_json_pointer_format_request_body**](docs/PathPostApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | +*PathPostApi* | [**post_json_pointer_format_response_body_for_content_types**](docs/PathPostApi.md#post_json_pointer_format_response_body_for_content_types) | **POST** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | +*PathPostApi* | [**post_maximum_validation_request_body**](docs/PathPostApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | +*PathPostApi* | [**post_maximum_validation_response_body_for_content_types**](docs/PathPostApi.md#post_maximum_validation_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_maximum_validation_with_unsigned_integer_request_body**](docs/PathPostApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | +*PathPostApi* | [**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](docs/PathPostApi.md#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | +*PathPostApi* | [**post_maxitems_validation_request_body**](docs/PathPostApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | +*PathPostApi* | [**post_maxitems_validation_response_body_for_content_types**](docs/PathPostApi.md#post_maxitems_validation_response_body_for_content_types) | **POST** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_maxlength_validation_request_body**](docs/PathPostApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | +*PathPostApi* | [**post_maxlength_validation_response_body_for_content_types**](docs/PathPostApi.md#post_maxlength_validation_response_body_for_content_types) | **POST** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_maxproperties0_means_the_object_is_empty_request_body**](docs/PathPostApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | +*PathPostApi* | [**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](docs/PathPostApi.md#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **POST** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | +*PathPostApi* | [**post_maxproperties_validation_request_body**](docs/PathPostApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | +*PathPostApi* | [**post_maxproperties_validation_response_body_for_content_types**](docs/PathPostApi.md#post_maxproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_minimum_validation_request_body**](docs/PathPostApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | +*PathPostApi* | [**post_minimum_validation_response_body_for_content_types**](docs/PathPostApi.md#post_minimum_validation_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_minimum_validation_with_signed_integer_request_body**](docs/PathPostApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | +*PathPostApi* | [**post_minimum_validation_with_signed_integer_response_body_for_content_types**](docs/PathPostApi.md#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | +*PathPostApi* | [**post_minitems_validation_request_body**](docs/PathPostApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | +*PathPostApi* | [**post_minitems_validation_response_body_for_content_types**](docs/PathPostApi.md#post_minitems_validation_response_body_for_content_types) | **POST** /responseBody/postMinitemsValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_minlength_validation_request_body**](docs/PathPostApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | +*PathPostApi* | [**post_minlength_validation_response_body_for_content_types**](docs/PathPostApi.md#post_minlength_validation_response_body_for_content_types) | **POST** /responseBody/postMinlengthValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_minproperties_validation_request_body**](docs/PathPostApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | +*PathPostApi* | [**post_minproperties_validation_response_body_for_content_types**](docs/PathPostApi.md#post_minproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_nested_allof_to_check_validation_semantics_request_body**](docs/PathPostApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | +*PathPostApi* | [**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](docs/PathPostApi.md#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | +*PathPostApi* | [**post_nested_anyof_to_check_validation_semantics_request_body**](docs/PathPostApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | +*PathPostApi* | [**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](docs/PathPostApi.md#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | +*PathPostApi* | [**post_nested_items_request_body**](docs/PathPostApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | +*PathPostApi* | [**post_nested_items_response_body_for_content_types**](docs/PathPostApi.md#post_nested_items_response_body_for_content_types) | **POST** /responseBody/postNestedItemsResponseBodyForContentTypes | +*PathPostApi* | [**post_nested_oneof_to_check_validation_semantics_request_body**](docs/PathPostApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | +*PathPostApi* | [**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](docs/PathPostApi.md#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | +*PathPostApi* | [**post_not_more_complex_schema_request_body**](docs/PathPostApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | +*PathPostApi* | [**post_not_more_complex_schema_response_body_for_content_types**](docs/PathPostApi.md#post_not_more_complex_schema_response_body_for_content_types) | **POST** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | +*PathPostApi* | [**post_not_request_body**](docs/PathPostApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | +*PathPostApi* | [**post_not_response_body_for_content_types**](docs/PathPostApi.md#post_not_response_body_for_content_types) | **POST** /responseBody/postNotResponseBodyForContentTypes | +*PathPostApi* | [**post_nul_characters_in_strings_request_body**](docs/PathPostApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | +*PathPostApi* | [**post_nul_characters_in_strings_response_body_for_content_types**](docs/PathPostApi.md#post_nul_characters_in_strings_response_body_for_content_types) | **POST** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | +*PathPostApi* | [**post_null_type_matches_only_the_null_object_request_body**](docs/PathPostApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | +*PathPostApi* | [**post_null_type_matches_only_the_null_object_response_body_for_content_types**](docs/PathPostApi.md#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **POST** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | +*PathPostApi* | [**post_number_type_matches_numbers_request_body**](docs/PathPostApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | +*PathPostApi* | [**post_number_type_matches_numbers_response_body_for_content_types**](docs/PathPostApi.md#post_number_type_matches_numbers_response_body_for_content_types) | **POST** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | +*PathPostApi* | [**post_object_properties_validation_request_body**](docs/PathPostApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | +*PathPostApi* | [**post_object_properties_validation_response_body_for_content_types**](docs/PathPostApi.md#post_object_properties_validation_response_body_for_content_types) | **POST** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_object_type_matches_objects_request_body**](docs/PathPostApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | +*PathPostApi* | [**post_object_type_matches_objects_response_body_for_content_types**](docs/PathPostApi.md#post_object_type_matches_objects_response_body_for_content_types) | **POST** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | +*PathPostApi* | [**post_oneof_complex_types_request_body**](docs/PathPostApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | +*PathPostApi* | [**post_oneof_complex_types_response_body_for_content_types**](docs/PathPostApi.md#post_oneof_complex_types_response_body_for_content_types) | **POST** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | +*PathPostApi* | [**post_oneof_request_body**](docs/PathPostApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | +*PathPostApi* | [**post_oneof_response_body_for_content_types**](docs/PathPostApi.md#post_oneof_response_body_for_content_types) | **POST** /responseBody/postOneofResponseBodyForContentTypes | +*PathPostApi* | [**post_oneof_with_base_schema_request_body**](docs/PathPostApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | +*PathPostApi* | [**post_oneof_with_base_schema_response_body_for_content_types**](docs/PathPostApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | +*PathPostApi* | [**post_oneof_with_empty_schema_request_body**](docs/PathPostApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | +*PathPostApi* | [**post_oneof_with_empty_schema_response_body_for_content_types**](docs/PathPostApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | +*PathPostApi* | [**post_pattern_is_not_anchored_request_body**](docs/PathPostApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | +*PathPostApi* | [**post_pattern_is_not_anchored_response_body_for_content_types**](docs/PathPostApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **POST** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | +*PathPostApi* | [**post_pattern_validation_request_body**](docs/PathPostApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | +*PathPostApi* | [**post_pattern_validation_response_body_for_content_types**](docs/PathPostApi.md#post_pattern_validation_response_body_for_content_types) | **POST** /responseBody/postPatternValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_properties_with_escaped_characters_request_body**](docs/PathPostApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | +*PathPostApi* | [**post_properties_with_escaped_characters_response_body_for_content_types**](docs/PathPostApi.md#post_properties_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | +*PathPostApi* | [**post_property_named_ref_that_is_not_a_reference_request_body**](docs/PathPostApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | +*PathPostApi* | [**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](docs/PathPostApi.md#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **POST** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | +*PathPostApi* | [**post_ref_in_additionalproperties_request_body**](docs/PathPostApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | +*PathPostApi* | [**post_ref_in_additionalproperties_response_body_for_content_types**](docs/PathPostApi.md#post_ref_in_additionalproperties_response_body_for_content_types) | **POST** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | +*PathPostApi* | [**post_ref_in_allof_request_body**](docs/PathPostApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | +*PathPostApi* | [**post_ref_in_allof_response_body_for_content_types**](docs/PathPostApi.md#post_ref_in_allof_response_body_for_content_types) | **POST** /responseBody/postRefInAllofResponseBodyForContentTypes | +*PathPostApi* | [**post_ref_in_anyof_request_body**](docs/PathPostApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | +*PathPostApi* | [**post_ref_in_anyof_response_body_for_content_types**](docs/PathPostApi.md#post_ref_in_anyof_response_body_for_content_types) | **POST** /responseBody/postRefInAnyofResponseBodyForContentTypes | +*PathPostApi* | [**post_ref_in_items_request_body**](docs/PathPostApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | +*PathPostApi* | [**post_ref_in_items_response_body_for_content_types**](docs/PathPostApi.md#post_ref_in_items_response_body_for_content_types) | **POST** /responseBody/postRefInItemsResponseBodyForContentTypes | +*PathPostApi* | [**post_ref_in_oneof_request_body**](docs/PathPostApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | +*PathPostApi* | [**post_ref_in_oneof_response_body_for_content_types**](docs/PathPostApi.md#post_ref_in_oneof_response_body_for_content_types) | **POST** /responseBody/postRefInOneofResponseBodyForContentTypes | +*PathPostApi* | [**post_ref_in_property_request_body**](docs/PathPostApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | +*PathPostApi* | [**post_ref_in_property_response_body_for_content_types**](docs/PathPostApi.md#post_ref_in_property_response_body_for_content_types) | **POST** /responseBody/postRefInPropertyResponseBodyForContentTypes | +*PathPostApi* | [**post_required_default_validation_request_body**](docs/PathPostApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | +*PathPostApi* | [**post_required_default_validation_response_body_for_content_types**](docs/PathPostApi.md#post_required_default_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_required_validation_request_body**](docs/PathPostApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | +*PathPostApi* | [**post_required_validation_response_body_for_content_types**](docs/PathPostApi.md#post_required_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_required_with_empty_array_request_body**](docs/PathPostApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | +*PathPostApi* | [**post_required_with_empty_array_response_body_for_content_types**](docs/PathPostApi.md#post_required_with_empty_array_response_body_for_content_types) | **POST** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | +*PathPostApi* | [**post_simple_enum_validation_request_body**](docs/PathPostApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | +*PathPostApi* | [**post_simple_enum_validation_response_body_for_content_types**](docs/PathPostApi.md#post_simple_enum_validation_response_body_for_content_types) | **POST** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_string_type_matches_strings_request_body**](docs/PathPostApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | +*PathPostApi* | [**post_string_type_matches_strings_response_body_for_content_types**](docs/PathPostApi.md#post_string_type_matches_strings_response_body_for_content_types) | **POST** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | +*PathPostApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](docs/PathPostApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | +*PathPostApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](docs/PathPostApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **POST** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | +*PathPostApi* | [**post_uniqueitems_false_validation_request_body**](docs/PathPostApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | +*PathPostApi* | [**post_uniqueitems_false_validation_response_body_for_content_types**](docs/PathPostApi.md#post_uniqueitems_false_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_uniqueitems_validation_request_body**](docs/PathPostApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | +*PathPostApi* | [**post_uniqueitems_validation_response_body_for_content_types**](docs/PathPostApi.md#post_uniqueitems_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | +*PathPostApi* | [**post_uri_format_request_body**](docs/PathPostApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | +*PathPostApi* | [**post_uri_format_response_body_for_content_types**](docs/PathPostApi.md#post_uri_format_response_body_for_content_types) | **POST** /responseBody/postUriFormatResponseBodyForContentTypes | +*PathPostApi* | [**post_uri_reference_format_request_body**](docs/PathPostApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | +*PathPostApi* | [**post_uri_reference_format_response_body_for_content_types**](docs/PathPostApi.md#post_uri_reference_format_response_body_for_content_types) | **POST** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | +*PathPostApi* | [**post_uri_template_format_request_body**](docs/PathPostApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | +*PathPostApi* | [**post_uri_template_format_response_body_for_content_types**](docs/PathPostApi.md#post_uri_template_format_response_body_for_content_types) | **POST** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **POST** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_allof_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_allof_response_body_for_content_types) | **POST** /responseBody/postAllofResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_allof_simple_types_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_allof_simple_types_response_body_for_content_types) | **POST** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_allof_with_base_schema_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_allof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_allof_with_one_empty_schema_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_allof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_allof_with_the_first_empty_schema_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_allof_with_the_last_empty_schema_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_allof_with_two_empty_schemas_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_allof_with_two_empty_schemas_response_body_for_content_types) | **POST** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_anyof_complex_types_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_anyof_complex_types_response_body_for_content_types) | **POST** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_anyof_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_anyof_response_body_for_content_types) | **POST** /responseBody/postAnyofResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_anyof_with_base_schema_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_anyof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_anyof_with_one_empty_schema_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_anyof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_array_type_matches_arrays_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_array_type_matches_arrays_response_body_for_content_types) | **POST** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_boolean_type_matches_booleans_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_boolean_type_matches_booleans_response_body_for_content_types) | **POST** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_by_int_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_by_int_response_body_for_content_types) | **POST** /responseBody/postByIntResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_by_number_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_by_number_response_body_for_content_types) | **POST** /responseBody/postByNumberResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_by_small_number_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_by_small_number_response_body_for_content_types) | **POST** /responseBody/postBySmallNumberResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_date_time_format_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_date_time_format_response_body_for_content_types) | **POST** /responseBody/postDateTimeFormatResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_email_format_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_email_format_response_body_for_content_types) | **POST** /responseBody/postEmailFormatResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_enum_with0_does_not_match_false_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_enum_with0_does_not_match_false_response_body_for_content_types) | **POST** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_enum_with1_does_not_match_true_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_enum_with1_does_not_match_true_response_body_for_content_types) | **POST** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_enum_with_escaped_characters_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_enum_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_enum_with_false_does_not_match0_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_enum_with_false_does_not_match0_response_body_for_content_types) | **POST** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_enum_with_true_does_not_match1_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_enum_with_true_does_not_match1_response_body_for_content_types) | **POST** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_enums_in_properties_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_enums_in_properties_response_body_for_content_types) | **POST** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_forbidden_property_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_forbidden_property_response_body_for_content_types) | **POST** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_hostname_format_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_hostname_format_response_body_for_content_types) | **POST** /responseBody/postHostnameFormatResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_integer_type_matches_integers_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_integer_type_matches_integers_response_body_for_content_types) | **POST** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **POST** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_invalid_string_value_for_default_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_invalid_string_value_for_default_response_body_for_content_types) | **POST** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_ipv4_format_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_ipv4_format_response_body_for_content_types) | **POST** /responseBody/postIpv4FormatResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_ipv6_format_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_ipv6_format_response_body_for_content_types) | **POST** /responseBody/postIpv6FormatResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_json_pointer_format_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_json_pointer_format_response_body_for_content_types) | **POST** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_maximum_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_maximum_validation_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_maxitems_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_maxitems_validation_response_body_for_content_types) | **POST** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_maxlength_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_maxlength_validation_response_body_for_content_types) | **POST** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **POST** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_maxproperties_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_maxproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_minimum_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_minimum_validation_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_minimum_validation_with_signed_integer_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_minitems_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_minitems_validation_response_body_for_content_types) | **POST** /responseBody/postMinitemsValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_minlength_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_minlength_validation_response_body_for_content_types) | **POST** /responseBody/postMinlengthValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_minproperties_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_minproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_nested_items_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_nested_items_response_body_for_content_types) | **POST** /responseBody/postNestedItemsResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_not_more_complex_schema_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_not_more_complex_schema_response_body_for_content_types) | **POST** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_not_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_not_response_body_for_content_types) | **POST** /responseBody/postNotResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_nul_characters_in_strings_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_nul_characters_in_strings_response_body_for_content_types) | **POST** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_null_type_matches_only_the_null_object_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **POST** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_number_type_matches_numbers_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_number_type_matches_numbers_response_body_for_content_types) | **POST** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_object_properties_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_object_properties_validation_response_body_for_content_types) | **POST** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_object_type_matches_objects_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_object_type_matches_objects_response_body_for_content_types) | **POST** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_oneof_complex_types_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_oneof_complex_types_response_body_for_content_types) | **POST** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_oneof_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_oneof_response_body_for_content_types) | **POST** /responseBody/postOneofResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_oneof_with_base_schema_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_oneof_with_empty_schema_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_pattern_is_not_anchored_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **POST** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_pattern_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_pattern_validation_response_body_for_content_types) | **POST** /responseBody/postPatternValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_properties_with_escaped_characters_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_properties_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **POST** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_ref_in_additionalproperties_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_ref_in_additionalproperties_response_body_for_content_types) | **POST** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_ref_in_allof_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_ref_in_allof_response_body_for_content_types) | **POST** /responseBody/postRefInAllofResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_ref_in_anyof_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_ref_in_anyof_response_body_for_content_types) | **POST** /responseBody/postRefInAnyofResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_ref_in_items_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_ref_in_items_response_body_for_content_types) | **POST** /responseBody/postRefInItemsResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_ref_in_oneof_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_ref_in_oneof_response_body_for_content_types) | **POST** /responseBody/postRefInOneofResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_ref_in_property_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_ref_in_property_response_body_for_content_types) | **POST** /responseBody/postRefInPropertyResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_required_default_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_required_default_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_required_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_required_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_required_with_empty_array_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_required_with_empty_array_response_body_for_content_types) | **POST** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_simple_enum_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_simple_enum_validation_response_body_for_content_types) | **POST** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_string_type_matches_strings_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_string_type_matches_strings_response_body_for_content_types) | **POST** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **POST** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_uniqueitems_false_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_uniqueitems_false_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_uniqueitems_validation_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_uniqueitems_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_uri_format_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_uri_format_response_body_for_content_types) | **POST** /responseBody/postUriFormatResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_uri_reference_format_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_uri_reference_format_response_body_for_content_types) | **POST** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | +*ResponseContentContentTypeSchemaApi* | [**post_uri_template_format_response_body_for_content_types**](docs/ResponseContentContentTypeSchemaApi.md#post_uri_template_format_response_body_for_content_types) | **POST** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | ## Documentation For Models @@ -496,6 +748,7 @@ Class | Method | HTTP request | Description + ## Notes for Large OpenAPI documents If the OpenAPI document is large, imports in unit_test_api.apis and unit_test_api.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/ContentTypeJsonApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/ContentTypeJsonApi.md new file mode 100644 index 00000000000..4219c043adb --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/ContentTypeJsonApi.md @@ -0,0 +1,11530 @@ +# unit_test_api.ContentTypeJsonApi + +All URIs are relative to *https://someserver.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](ContentTypeJsonApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | +[**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](ContentTypeJsonApi.md#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | +[**post_additionalproperties_are_allowed_by_default_request_body**](ContentTypeJsonApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | +[**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](ContentTypeJsonApi.md#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | +[**post_additionalproperties_can_exist_by_itself_request_body**](ContentTypeJsonApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | +[**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](ContentTypeJsonApi.md#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | +[**post_additionalproperties_should_not_look_in_applicators_request_body**](ContentTypeJsonApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | +[**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](ContentTypeJsonApi.md#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | +[**post_allof_combined_with_anyof_oneof_request_body**](ContentTypeJsonApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | +[**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](ContentTypeJsonApi.md#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **POST** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | +[**post_allof_request_body**](ContentTypeJsonApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | +[**post_allof_response_body_for_content_types**](ContentTypeJsonApi.md#post_allof_response_body_for_content_types) | **POST** /responseBody/postAllofResponseBodyForContentTypes | +[**post_allof_simple_types_request_body**](ContentTypeJsonApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | +[**post_allof_simple_types_response_body_for_content_types**](ContentTypeJsonApi.md#post_allof_simple_types_response_body_for_content_types) | **POST** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | +[**post_allof_with_base_schema_request_body**](ContentTypeJsonApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | +[**post_allof_with_base_schema_response_body_for_content_types**](ContentTypeJsonApi.md#post_allof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | +[**post_allof_with_one_empty_schema_request_body**](ContentTypeJsonApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | +[**post_allof_with_one_empty_schema_response_body_for_content_types**](ContentTypeJsonApi.md#post_allof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | +[**post_allof_with_the_first_empty_schema_request_body**](ContentTypeJsonApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | +[**post_allof_with_the_first_empty_schema_response_body_for_content_types**](ContentTypeJsonApi.md#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | +[**post_allof_with_the_last_empty_schema_request_body**](ContentTypeJsonApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | +[**post_allof_with_the_last_empty_schema_response_body_for_content_types**](ContentTypeJsonApi.md#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | +[**post_allof_with_two_empty_schemas_request_body**](ContentTypeJsonApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | +[**post_allof_with_two_empty_schemas_response_body_for_content_types**](ContentTypeJsonApi.md#post_allof_with_two_empty_schemas_response_body_for_content_types) | **POST** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | +[**post_anyof_complex_types_request_body**](ContentTypeJsonApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | +[**post_anyof_complex_types_response_body_for_content_types**](ContentTypeJsonApi.md#post_anyof_complex_types_response_body_for_content_types) | **POST** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | +[**post_anyof_request_body**](ContentTypeJsonApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | +[**post_anyof_response_body_for_content_types**](ContentTypeJsonApi.md#post_anyof_response_body_for_content_types) | **POST** /responseBody/postAnyofResponseBodyForContentTypes | +[**post_anyof_with_base_schema_request_body**](ContentTypeJsonApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | +[**post_anyof_with_base_schema_response_body_for_content_types**](ContentTypeJsonApi.md#post_anyof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | +[**post_anyof_with_one_empty_schema_request_body**](ContentTypeJsonApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | +[**post_anyof_with_one_empty_schema_response_body_for_content_types**](ContentTypeJsonApi.md#post_anyof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | +[**post_array_type_matches_arrays_request_body**](ContentTypeJsonApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | +[**post_array_type_matches_arrays_response_body_for_content_types**](ContentTypeJsonApi.md#post_array_type_matches_arrays_response_body_for_content_types) | **POST** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | +[**post_boolean_type_matches_booleans_request_body**](ContentTypeJsonApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | +[**post_boolean_type_matches_booleans_response_body_for_content_types**](ContentTypeJsonApi.md#post_boolean_type_matches_booleans_response_body_for_content_types) | **POST** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | +[**post_by_int_request_body**](ContentTypeJsonApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | +[**post_by_int_response_body_for_content_types**](ContentTypeJsonApi.md#post_by_int_response_body_for_content_types) | **POST** /responseBody/postByIntResponseBodyForContentTypes | +[**post_by_number_request_body**](ContentTypeJsonApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | +[**post_by_number_response_body_for_content_types**](ContentTypeJsonApi.md#post_by_number_response_body_for_content_types) | **POST** /responseBody/postByNumberResponseBodyForContentTypes | +[**post_by_small_number_request_body**](ContentTypeJsonApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | +[**post_by_small_number_response_body_for_content_types**](ContentTypeJsonApi.md#post_by_small_number_response_body_for_content_types) | **POST** /responseBody/postBySmallNumberResponseBodyForContentTypes | +[**post_date_time_format_request_body**](ContentTypeJsonApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | +[**post_date_time_format_response_body_for_content_types**](ContentTypeJsonApi.md#post_date_time_format_response_body_for_content_types) | **POST** /responseBody/postDateTimeFormatResponseBodyForContentTypes | +[**post_email_format_request_body**](ContentTypeJsonApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | +[**post_email_format_response_body_for_content_types**](ContentTypeJsonApi.md#post_email_format_response_body_for_content_types) | **POST** /responseBody/postEmailFormatResponseBodyForContentTypes | +[**post_enum_with0_does_not_match_false_request_body**](ContentTypeJsonApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | +[**post_enum_with0_does_not_match_false_response_body_for_content_types**](ContentTypeJsonApi.md#post_enum_with0_does_not_match_false_response_body_for_content_types) | **POST** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | +[**post_enum_with1_does_not_match_true_request_body**](ContentTypeJsonApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | +[**post_enum_with1_does_not_match_true_response_body_for_content_types**](ContentTypeJsonApi.md#post_enum_with1_does_not_match_true_response_body_for_content_types) | **POST** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | +[**post_enum_with_escaped_characters_request_body**](ContentTypeJsonApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | +[**post_enum_with_escaped_characters_response_body_for_content_types**](ContentTypeJsonApi.md#post_enum_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | +[**post_enum_with_false_does_not_match0_request_body**](ContentTypeJsonApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | +[**post_enum_with_false_does_not_match0_response_body_for_content_types**](ContentTypeJsonApi.md#post_enum_with_false_does_not_match0_response_body_for_content_types) | **POST** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | +[**post_enum_with_true_does_not_match1_request_body**](ContentTypeJsonApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | +[**post_enum_with_true_does_not_match1_response_body_for_content_types**](ContentTypeJsonApi.md#post_enum_with_true_does_not_match1_response_body_for_content_types) | **POST** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | +[**post_enums_in_properties_request_body**](ContentTypeJsonApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | +[**post_enums_in_properties_response_body_for_content_types**](ContentTypeJsonApi.md#post_enums_in_properties_response_body_for_content_types) | **POST** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | +[**post_forbidden_property_request_body**](ContentTypeJsonApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | +[**post_forbidden_property_response_body_for_content_types**](ContentTypeJsonApi.md#post_forbidden_property_response_body_for_content_types) | **POST** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | +[**post_hostname_format_request_body**](ContentTypeJsonApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | +[**post_hostname_format_response_body_for_content_types**](ContentTypeJsonApi.md#post_hostname_format_response_body_for_content_types) | **POST** /responseBody/postHostnameFormatResponseBodyForContentTypes | +[**post_integer_type_matches_integers_request_body**](ContentTypeJsonApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | +[**post_integer_type_matches_integers_response_body_for_content_types**](ContentTypeJsonApi.md#post_integer_type_matches_integers_response_body_for_content_types) | **POST** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | +[**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](ContentTypeJsonApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | +[**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](ContentTypeJsonApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **POST** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | +[**post_invalid_string_value_for_default_request_body**](ContentTypeJsonApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | +[**post_invalid_string_value_for_default_response_body_for_content_types**](ContentTypeJsonApi.md#post_invalid_string_value_for_default_response_body_for_content_types) | **POST** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | +[**post_ipv4_format_request_body**](ContentTypeJsonApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | +[**post_ipv4_format_response_body_for_content_types**](ContentTypeJsonApi.md#post_ipv4_format_response_body_for_content_types) | **POST** /responseBody/postIpv4FormatResponseBodyForContentTypes | +[**post_ipv6_format_request_body**](ContentTypeJsonApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | +[**post_ipv6_format_response_body_for_content_types**](ContentTypeJsonApi.md#post_ipv6_format_response_body_for_content_types) | **POST** /responseBody/postIpv6FormatResponseBodyForContentTypes | +[**post_json_pointer_format_request_body**](ContentTypeJsonApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | +[**post_json_pointer_format_response_body_for_content_types**](ContentTypeJsonApi.md#post_json_pointer_format_response_body_for_content_types) | **POST** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | +[**post_maximum_validation_request_body**](ContentTypeJsonApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | +[**post_maximum_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_maximum_validation_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationResponseBodyForContentTypes | +[**post_maximum_validation_with_unsigned_integer_request_body**](ContentTypeJsonApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | +[**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](ContentTypeJsonApi.md#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | +[**post_maxitems_validation_request_body**](ContentTypeJsonApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | +[**post_maxitems_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_maxitems_validation_response_body_for_content_types) | **POST** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | +[**post_maxlength_validation_request_body**](ContentTypeJsonApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | +[**post_maxlength_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_maxlength_validation_response_body_for_content_types) | **POST** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | +[**post_maxproperties0_means_the_object_is_empty_request_body**](ContentTypeJsonApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | +[**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](ContentTypeJsonApi.md#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **POST** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | +[**post_maxproperties_validation_request_body**](ContentTypeJsonApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | +[**post_maxproperties_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_maxproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | +[**post_minimum_validation_request_body**](ContentTypeJsonApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | +[**post_minimum_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_minimum_validation_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationResponseBodyForContentTypes | +[**post_minimum_validation_with_signed_integer_request_body**](ContentTypeJsonApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | +[**post_minimum_validation_with_signed_integer_response_body_for_content_types**](ContentTypeJsonApi.md#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | +[**post_minitems_validation_request_body**](ContentTypeJsonApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | +[**post_minitems_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_minitems_validation_response_body_for_content_types) | **POST** /responseBody/postMinitemsValidationResponseBodyForContentTypes | +[**post_minlength_validation_request_body**](ContentTypeJsonApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | +[**post_minlength_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_minlength_validation_response_body_for_content_types) | **POST** /responseBody/postMinlengthValidationResponseBodyForContentTypes | +[**post_minproperties_validation_request_body**](ContentTypeJsonApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | +[**post_minproperties_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_minproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | +[**post_nested_allof_to_check_validation_semantics_request_body**](ContentTypeJsonApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | +[**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](ContentTypeJsonApi.md#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | +[**post_nested_anyof_to_check_validation_semantics_request_body**](ContentTypeJsonApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | +[**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](ContentTypeJsonApi.md#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | +[**post_nested_items_request_body**](ContentTypeJsonApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | +[**post_nested_items_response_body_for_content_types**](ContentTypeJsonApi.md#post_nested_items_response_body_for_content_types) | **POST** /responseBody/postNestedItemsResponseBodyForContentTypes | +[**post_nested_oneof_to_check_validation_semantics_request_body**](ContentTypeJsonApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | +[**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](ContentTypeJsonApi.md#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | +[**post_not_more_complex_schema_request_body**](ContentTypeJsonApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | +[**post_not_more_complex_schema_response_body_for_content_types**](ContentTypeJsonApi.md#post_not_more_complex_schema_response_body_for_content_types) | **POST** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | +[**post_not_request_body**](ContentTypeJsonApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | +[**post_not_response_body_for_content_types**](ContentTypeJsonApi.md#post_not_response_body_for_content_types) | **POST** /responseBody/postNotResponseBodyForContentTypes | +[**post_nul_characters_in_strings_request_body**](ContentTypeJsonApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | +[**post_nul_characters_in_strings_response_body_for_content_types**](ContentTypeJsonApi.md#post_nul_characters_in_strings_response_body_for_content_types) | **POST** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | +[**post_null_type_matches_only_the_null_object_request_body**](ContentTypeJsonApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | +[**post_null_type_matches_only_the_null_object_response_body_for_content_types**](ContentTypeJsonApi.md#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **POST** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | +[**post_number_type_matches_numbers_request_body**](ContentTypeJsonApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | +[**post_number_type_matches_numbers_response_body_for_content_types**](ContentTypeJsonApi.md#post_number_type_matches_numbers_response_body_for_content_types) | **POST** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | +[**post_object_properties_validation_request_body**](ContentTypeJsonApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | +[**post_object_properties_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_object_properties_validation_response_body_for_content_types) | **POST** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | +[**post_object_type_matches_objects_request_body**](ContentTypeJsonApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | +[**post_object_type_matches_objects_response_body_for_content_types**](ContentTypeJsonApi.md#post_object_type_matches_objects_response_body_for_content_types) | **POST** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | +[**post_oneof_complex_types_request_body**](ContentTypeJsonApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | +[**post_oneof_complex_types_response_body_for_content_types**](ContentTypeJsonApi.md#post_oneof_complex_types_response_body_for_content_types) | **POST** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | +[**post_oneof_request_body**](ContentTypeJsonApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | +[**post_oneof_response_body_for_content_types**](ContentTypeJsonApi.md#post_oneof_response_body_for_content_types) | **POST** /responseBody/postOneofResponseBodyForContentTypes | +[**post_oneof_with_base_schema_request_body**](ContentTypeJsonApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | +[**post_oneof_with_base_schema_response_body_for_content_types**](ContentTypeJsonApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | +[**post_oneof_with_empty_schema_request_body**](ContentTypeJsonApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | +[**post_oneof_with_empty_schema_response_body_for_content_types**](ContentTypeJsonApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | +[**post_pattern_is_not_anchored_request_body**](ContentTypeJsonApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | +[**post_pattern_is_not_anchored_response_body_for_content_types**](ContentTypeJsonApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **POST** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | +[**post_pattern_validation_request_body**](ContentTypeJsonApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | +[**post_pattern_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_pattern_validation_response_body_for_content_types) | **POST** /responseBody/postPatternValidationResponseBodyForContentTypes | +[**post_properties_with_escaped_characters_request_body**](ContentTypeJsonApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | +[**post_properties_with_escaped_characters_response_body_for_content_types**](ContentTypeJsonApi.md#post_properties_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | +[**post_property_named_ref_that_is_not_a_reference_request_body**](ContentTypeJsonApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | +[**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](ContentTypeJsonApi.md#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **POST** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | +[**post_ref_in_additionalproperties_request_body**](ContentTypeJsonApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | +[**post_ref_in_additionalproperties_response_body_for_content_types**](ContentTypeJsonApi.md#post_ref_in_additionalproperties_response_body_for_content_types) | **POST** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | +[**post_ref_in_allof_request_body**](ContentTypeJsonApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | +[**post_ref_in_allof_response_body_for_content_types**](ContentTypeJsonApi.md#post_ref_in_allof_response_body_for_content_types) | **POST** /responseBody/postRefInAllofResponseBodyForContentTypes | +[**post_ref_in_anyof_request_body**](ContentTypeJsonApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | +[**post_ref_in_anyof_response_body_for_content_types**](ContentTypeJsonApi.md#post_ref_in_anyof_response_body_for_content_types) | **POST** /responseBody/postRefInAnyofResponseBodyForContentTypes | +[**post_ref_in_items_request_body**](ContentTypeJsonApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | +[**post_ref_in_items_response_body_for_content_types**](ContentTypeJsonApi.md#post_ref_in_items_response_body_for_content_types) | **POST** /responseBody/postRefInItemsResponseBodyForContentTypes | +[**post_ref_in_oneof_request_body**](ContentTypeJsonApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | +[**post_ref_in_oneof_response_body_for_content_types**](ContentTypeJsonApi.md#post_ref_in_oneof_response_body_for_content_types) | **POST** /responseBody/postRefInOneofResponseBodyForContentTypes | +[**post_ref_in_property_request_body**](ContentTypeJsonApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | +[**post_ref_in_property_response_body_for_content_types**](ContentTypeJsonApi.md#post_ref_in_property_response_body_for_content_types) | **POST** /responseBody/postRefInPropertyResponseBodyForContentTypes | +[**post_required_default_validation_request_body**](ContentTypeJsonApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | +[**post_required_default_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_required_default_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | +[**post_required_validation_request_body**](ContentTypeJsonApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | +[**post_required_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_required_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredValidationResponseBodyForContentTypes | +[**post_required_with_empty_array_request_body**](ContentTypeJsonApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | +[**post_required_with_empty_array_response_body_for_content_types**](ContentTypeJsonApi.md#post_required_with_empty_array_response_body_for_content_types) | **POST** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | +[**post_simple_enum_validation_request_body**](ContentTypeJsonApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | +[**post_simple_enum_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_simple_enum_validation_response_body_for_content_types) | **POST** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | +[**post_string_type_matches_strings_request_body**](ContentTypeJsonApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | +[**post_string_type_matches_strings_response_body_for_content_types**](ContentTypeJsonApi.md#post_string_type_matches_strings_response_body_for_content_types) | **POST** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | +[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](ContentTypeJsonApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | +[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](ContentTypeJsonApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **POST** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | +[**post_uniqueitems_false_validation_request_body**](ContentTypeJsonApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | +[**post_uniqueitems_false_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_uniqueitems_false_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | +[**post_uniqueitems_validation_request_body**](ContentTypeJsonApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | +[**post_uniqueitems_validation_response_body_for_content_types**](ContentTypeJsonApi.md#post_uniqueitems_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | +[**post_uri_format_request_body**](ContentTypeJsonApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | +[**post_uri_format_response_body_for_content_types**](ContentTypeJsonApi.md#post_uri_format_response_body_for_content_types) | **POST** /responseBody/postUriFormatResponseBodyForContentTypes | +[**post_uri_reference_format_request_body**](ContentTypeJsonApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | +[**post_uri_reference_format_response_body_for_content_types**](ContentTypeJsonApi.md#post_uri_reference_format_response_body_for_content_types) | **POST** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | +[**post_uri_template_format_request_body**](ContentTypeJsonApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | +[**post_uri_template_format_response_body_for_content_types**](ContentTypeJsonApi.md#post_uri_template_format_response_body_for_content_types) | **POST** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | + +# **post_additionalproperties_allows_a_schema_which_should_validate_request_body** +> post_additionalproperties_allows_a_schema_which_should_validate_request_body(additionalproperties_allows_a_schema_which_should_validate) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AdditionalpropertiesAllowsASchemaWhichShouldValidate( + foo=None, + bar=None, + ) + try: + api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %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 +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 +------------- | ------------- | ------------- +[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types** +> AdditionalpropertiesAllowsASchemaWhichShouldValidate post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | + + + +[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_are_allowed_by_default_request_body** +> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AdditionalpropertiesAreAllowedByDefault(None) + try: + api_response = api_instance.post_additionalproperties_are_allowed_by_default_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_additionalproperties_are_allowed_by_default_request_body: %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 +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 +------------- | ------------- | ------------- +[**AdditionalpropertiesAreAllowedByDefault**](AdditionalpropertiesAreAllowedByDefault.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_are_allowed_by_default_response_body_for_content_types** +> AdditionalpropertiesAreAllowedByDefault post_additionalproperties_are_allowed_by_default_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_are_allowed_by_default_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_additionalproperties_are_allowed_by_default_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesAreAllowedByDefault**](AdditionalpropertiesAreAllowedByDefault.md) | | + + + +[**AdditionalpropertiesAreAllowedByDefault**](AdditionalpropertiesAreAllowedByDefault.md) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_can_exist_by_itself_request_body** +> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AdditionalpropertiesCanExistByItself( + key=True, + ) + try: + api_response = api_instance.post_additionalproperties_can_exist_by_itself_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_additionalproperties_can_exist_by_itself_request_body: %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 +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 +------------- | ------------- | ------------- +[**AdditionalpropertiesCanExistByItself**](AdditionalpropertiesCanExistByItself.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_can_exist_by_itself_response_body_for_content_types** +> AdditionalpropertiesCanExistByItself post_additionalproperties_can_exist_by_itself_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_can_exist_by_itself_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_additionalproperties_can_exist_by_itself_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesCanExistByItself**](AdditionalpropertiesCanExistByItself.md) | | + + + +[**AdditionalpropertiesCanExistByItself**](AdditionalpropertiesCanExistByItself.md) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_should_not_look_in_applicators_request_body** +> post_additionalproperties_should_not_look_in_applicators_request_body(additionalproperties_should_not_look_in_applicators) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AdditionalpropertiesShouldNotLookInApplicators(None) + try: + api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_additionalproperties_should_not_look_in_applicators_request_body: %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 +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 +------------- | ------------- | ------------- +[**AdditionalpropertiesShouldNotLookInApplicators**](AdditionalpropertiesShouldNotLookInApplicators.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types** +> AdditionalpropertiesShouldNotLookInApplicators post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesShouldNotLookInApplicators**](AdditionalpropertiesShouldNotLookInApplicators.md) | | + + + +[**AdditionalpropertiesShouldNotLookInApplicators**](AdditionalpropertiesShouldNotLookInApplicators.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_combined_with_anyof_oneof_request_body** +> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofCombinedWithAnyofOneof(None) + try: + api_response = api_instance.post_allof_combined_with_anyof_oneof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_combined_with_anyof_oneof_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofCombinedWithAnyofOneof**](AllofCombinedWithAnyofOneof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_combined_with_anyof_oneof_response_body_for_content_types** +> AllofCombinedWithAnyofOneof post_allof_combined_with_anyof_oneof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_combined_with_anyof_oneof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_combined_with_anyof_oneof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofCombinedWithAnyofOneof**](AllofCombinedWithAnyofOneof.md) | | + + + +[**AllofCombinedWithAnyofOneof**](AllofCombinedWithAnyofOneof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_request_body** +> post_allof_request_body(allof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof import Allof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = Allof(None) + try: + api_response = api_instance.post_allof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_request_body: %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 +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 +------------- | ------------- | ------------- +[**Allof**](Allof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_response_body_for_content_types** +> Allof post_allof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof import Allof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Allof**](Allof.md) | | + + + +[**Allof**](Allof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_simple_types_request_body** +> post_allof_simple_types_request_body(allof_simple_types) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_simple_types import AllofSimpleTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofSimpleTypes(None) + try: + api_response = api_instance.post_allof_simple_types_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_simple_types_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofSimpleTypes**](AllofSimpleTypes.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_simple_types_response_body_for_content_types** +> AllofSimpleTypes post_allof_simple_types_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_simple_types import AllofSimpleTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_simple_types_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_simple_types_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofSimpleTypes**](AllofSimpleTypes.md) | | + + + +[**AllofSimpleTypes**](AllofSimpleTypes.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_base_schema_request_body** +> post_allof_with_base_schema_request_body(allof_with_base_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofWithBaseSchema({}) + try: + api_response = api_instance.post_allof_with_base_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_with_base_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofWithBaseSchema**](AllofWithBaseSchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_base_schema_response_body_for_content_types** +> AllofWithBaseSchema post_allof_with_base_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_base_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_with_base_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithBaseSchema**](AllofWithBaseSchema.md) | | + + + +[**AllofWithBaseSchema**](AllofWithBaseSchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_one_empty_schema_request_body** +> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofWithOneEmptySchema(None) + try: + api_response = api_instance.post_allof_with_one_empty_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_with_one_empty_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofWithOneEmptySchema**](AllofWithOneEmptySchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_one_empty_schema_response_body_for_content_types** +> AllofWithOneEmptySchema post_allof_with_one_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_one_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_with_one_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithOneEmptySchema**](AllofWithOneEmptySchema.md) | | + + + +[**AllofWithOneEmptySchema**](AllofWithOneEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_the_first_empty_schema_request_body** +> post_allof_with_the_first_empty_schema_request_body(allof_with_the_first_empty_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofWithTheFirstEmptySchema(None) + try: + api_response = api_instance.post_allof_with_the_first_empty_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_with_the_first_empty_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofWithTheFirstEmptySchema**](AllofWithTheFirstEmptySchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_the_first_empty_schema_response_body_for_content_types** +> AllofWithTheFirstEmptySchema post_allof_with_the_first_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_the_first_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_with_the_first_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithTheFirstEmptySchema**](AllofWithTheFirstEmptySchema.md) | | + + + +[**AllofWithTheFirstEmptySchema**](AllofWithTheFirstEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_the_last_empty_schema_request_body** +> post_allof_with_the_last_empty_schema_request_body(allof_with_the_last_empty_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofWithTheLastEmptySchema(None) + try: + api_response = api_instance.post_allof_with_the_last_empty_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_with_the_last_empty_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofWithTheLastEmptySchema**](AllofWithTheLastEmptySchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_the_last_empty_schema_response_body_for_content_types** +> AllofWithTheLastEmptySchema post_allof_with_the_last_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_the_last_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_with_the_last_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithTheLastEmptySchema**](AllofWithTheLastEmptySchema.md) | | + + + +[**AllofWithTheLastEmptySchema**](AllofWithTheLastEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_two_empty_schemas_request_body** +> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofWithTwoEmptySchemas(None) + try: + api_response = api_instance.post_allof_with_two_empty_schemas_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_with_two_empty_schemas_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofWithTwoEmptySchemas**](AllofWithTwoEmptySchemas.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_two_empty_schemas_response_body_for_content_types** +> AllofWithTwoEmptySchemas post_allof_with_two_empty_schemas_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_two_empty_schemas_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_allof_with_two_empty_schemas_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithTwoEmptySchemas**](AllofWithTwoEmptySchemas.md) | | + + + +[**AllofWithTwoEmptySchemas**](AllofWithTwoEmptySchemas.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_complex_types_request_body** +> post_anyof_complex_types_request_body(anyof_complex_types) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.anyof_complex_types import AnyofComplexTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AnyofComplexTypes(None) + try: + api_response = api_instance.post_anyof_complex_types_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_anyof_complex_types_request_body: %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 +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 +------------- | ------------- | ------------- +[**AnyofComplexTypes**](AnyofComplexTypes.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_complex_types_response_body_for_content_types** +> AnyofComplexTypes post_anyof_complex_types_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.anyof_complex_types import AnyofComplexTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_complex_types_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_anyof_complex_types_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AnyofComplexTypes**](AnyofComplexTypes.md) | | + + + +[**AnyofComplexTypes**](AnyofComplexTypes.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_request_body** +> post_anyof_request_body(anyof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.anyof import Anyof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = Anyof(None) + try: + api_response = api_instance.post_anyof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_anyof_request_body: %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 +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 +------------- | ------------- | ------------- +[**Anyof**](Anyof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_response_body_for_content_types** +> Anyof post_anyof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.anyof import Anyof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_anyof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Anyof**](Anyof.md) | | + + + +[**Anyof**](Anyof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_with_base_schema_request_body** +> post_anyof_with_base_schema_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AnyofWithBaseSchema("body_example") + try: + api_response = api_instance.post_anyof_with_base_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_anyof_with_base_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AnyofWithBaseSchema**](AnyofWithBaseSchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_with_base_schema_response_body_for_content_types** +> AnyofWithBaseSchema post_anyof_with_base_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_with_base_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_anyof_with_base_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AnyofWithBaseSchema**](AnyofWithBaseSchema.md) | | + + + +[**AnyofWithBaseSchema**](AnyofWithBaseSchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_with_one_empty_schema_request_body** +> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = AnyofWithOneEmptySchema(None) + try: + api_response = api_instance.post_anyof_with_one_empty_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_anyof_with_one_empty_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AnyofWithOneEmptySchema**](AnyofWithOneEmptySchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_with_one_empty_schema_response_body_for_content_types** +> AnyofWithOneEmptySchema post_anyof_with_one_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_with_one_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_anyof_with_one_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AnyofWithOneEmptySchema**](AnyofWithOneEmptySchema.md) | | + + + +[**AnyofWithOneEmptySchema**](AnyofWithOneEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_array_type_matches_arrays_request_body** +> post_array_type_matches_arrays_request_body(array_type_matches_arrays) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = ArrayTypeMatchesArrays([ + None + ]) + try: + api_response = api_instance.post_array_type_matches_arrays_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_array_type_matches_arrays_request_body: %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 +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 +------------- | ------------- | ------------- +[**ArrayTypeMatchesArrays**](ArrayTypeMatchesArrays.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_array_type_matches_arrays_response_body_for_content_types** +> ArrayTypeMatchesArrays post_array_type_matches_arrays_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_array_type_matches_arrays_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_array_type_matches_arrays_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArrayTypeMatchesArrays**](ArrayTypeMatchesArrays.md) | | + + + +[**ArrayTypeMatchesArrays**](ArrayTypeMatchesArrays.md) + +### Authorization + +No authorization required + +[[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) + +# **post_boolean_type_matches_booleans_request_body** +> post_boolean_type_matches_booleans_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = True + try: + api_response = api_instance.post_boolean_type_matches_booleans_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_boolean_type_matches_booleans_request_body: %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 +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 +------------- | ------------- | ------------- +**bool** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_boolean_type_matches_booleans_response_body_for_content_types** +> bool post_boolean_type_matches_booleans_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_boolean_type_matches_booleans_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_boolean_type_matches_booleans_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**bool** | | + + +**bool** + +### Authorization + +No authorization required + +[[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) + +# **post_by_int_request_body** +> post_by_int_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.by_int import ByInt +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = ByInt(None) + try: + api_response = api_instance.post_by_int_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_by_int_request_body: %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 +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 +------------- | ------------- | ------------- +[**ByInt**](ByInt.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_by_int_response_body_for_content_types** +> ByInt post_by_int_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.by_int import ByInt +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_by_int_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_by_int_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ByInt**](ByInt.md) | | + + + +[**ByInt**](ByInt.md) + +### Authorization + +No authorization required + +[[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) + +# **post_by_number_request_body** +> post_by_number_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.by_number import ByNumber +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = ByNumber(None) + try: + api_response = api_instance.post_by_number_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_by_number_request_body: %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 +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 +------------- | ------------- | ------------- +[**ByNumber**](ByNumber.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_by_number_response_body_for_content_types** +> ByNumber post_by_number_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.by_number import ByNumber +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_by_number_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_by_number_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ByNumber**](ByNumber.md) | | + + + +[**ByNumber**](ByNumber.md) + +### Authorization + +No authorization required + +[[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) + +# **post_by_small_number_request_body** +> post_by_small_number_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.by_small_number import BySmallNumber +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = BySmallNumber(None) + try: + api_response = api_instance.post_by_small_number_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_by_small_number_request_body: %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 +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 +------------- | ------------- | ------------- +[**BySmallNumber**](BySmallNumber.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_by_small_number_response_body_for_content_types** +> BySmallNumber post_by_small_number_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.by_small_number import BySmallNumber +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_by_small_number_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_by_small_number_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**BySmallNumber**](BySmallNumber.md) | | + + + +[**BySmallNumber**](BySmallNumber.md) + +### Authorization + +No authorization required + +[[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) + +# **post_date_time_format_request_body** +> post_date_time_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_date_time_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_date_time_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_date_time_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_date_time_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_date_time_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_date_time_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_email_format_request_body** +> post_email_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_email_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_email_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_email_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_email_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_email_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_email_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with0_does_not_match_false_request_body** +> post_enum_with0_does_not_match_false_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumWith0DoesNotMatchFalse(0) + try: + api_response = api_instance.post_enum_with0_does_not_match_false_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enum_with0_does_not_match_false_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumWith0DoesNotMatchFalse**](EnumWith0DoesNotMatchFalse.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with0_does_not_match_false_response_body_for_content_types** +> EnumWith0DoesNotMatchFalse post_enum_with0_does_not_match_false_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with0_does_not_match_false_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enum_with0_does_not_match_false_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWith0DoesNotMatchFalse**](EnumWith0DoesNotMatchFalse.md) | | + + + +[**EnumWith0DoesNotMatchFalse**](EnumWith0DoesNotMatchFalse.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with1_does_not_match_true_request_body** +> post_enum_with1_does_not_match_true_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumWith1DoesNotMatchTrue(1) + try: + api_response = api_instance.post_enum_with1_does_not_match_true_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enum_with1_does_not_match_true_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumWith1DoesNotMatchTrue**](EnumWith1DoesNotMatchTrue.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with1_does_not_match_true_response_body_for_content_types** +> EnumWith1DoesNotMatchTrue post_enum_with1_does_not_match_true_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with1_does_not_match_true_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enum_with1_does_not_match_true_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWith1DoesNotMatchTrue**](EnumWith1DoesNotMatchTrue.md) | | + + + +[**EnumWith1DoesNotMatchTrue**](EnumWith1DoesNotMatchTrue.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_escaped_characters_request_body** +> post_enum_with_escaped_characters_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumWithEscapedCharacters("foo +bar") + try: + api_response = api_instance.post_enum_with_escaped_characters_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enum_with_escaped_characters_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumWithEscapedCharacters**](EnumWithEscapedCharacters.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_escaped_characters_response_body_for_content_types** +> EnumWithEscapedCharacters post_enum_with_escaped_characters_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with_escaped_characters_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enum_with_escaped_characters_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWithEscapedCharacters**](EnumWithEscapedCharacters.md) | | + + + +[**EnumWithEscapedCharacters**](EnumWithEscapedCharacters.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_false_does_not_match0_request_body** +> post_enum_with_false_does_not_match0_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumWithFalseDoesNotMatch0(False) + try: + api_response = api_instance.post_enum_with_false_does_not_match0_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enum_with_false_does_not_match0_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumWithFalseDoesNotMatch0**](EnumWithFalseDoesNotMatch0.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_false_does_not_match0_response_body_for_content_types** +> EnumWithFalseDoesNotMatch0 post_enum_with_false_does_not_match0_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with_false_does_not_match0_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enum_with_false_does_not_match0_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWithFalseDoesNotMatch0**](EnumWithFalseDoesNotMatch0.md) | | + + + +[**EnumWithFalseDoesNotMatch0**](EnumWithFalseDoesNotMatch0.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_true_does_not_match1_request_body** +> post_enum_with_true_does_not_match1_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumWithTrueDoesNotMatch1(True) + try: + api_response = api_instance.post_enum_with_true_does_not_match1_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enum_with_true_does_not_match1_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumWithTrueDoesNotMatch1**](EnumWithTrueDoesNotMatch1.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_true_does_not_match1_response_body_for_content_types** +> EnumWithTrueDoesNotMatch1 post_enum_with_true_does_not_match1_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with_true_does_not_match1_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enum_with_true_does_not_match1_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWithTrueDoesNotMatch1**](EnumWithTrueDoesNotMatch1.md) | | + + + +[**EnumWithTrueDoesNotMatch1**](EnumWithTrueDoesNotMatch1.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enums_in_properties_request_body** +> post_enums_in_properties_request_body(enums_in_properties) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enums_in_properties import EnumsInProperties +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumsInProperties( + foo="foo", + bar="bar", + ) + try: + api_response = api_instance.post_enums_in_properties_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enums_in_properties_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumsInProperties**](EnumsInProperties.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enums_in_properties_response_body_for_content_types** +> EnumsInProperties post_enums_in_properties_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.enums_in_properties import EnumsInProperties +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enums_in_properties_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_enums_in_properties_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumsInProperties**](EnumsInProperties.md) | | + + + +[**EnumsInProperties**](EnumsInProperties.md) + +### Authorization + +No authorization required + +[[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) + +# **post_forbidden_property_request_body** +> post_forbidden_property_request_body(forbidden_property) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.forbidden_property import ForbiddenProperty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = ForbiddenProperty(None) + try: + api_response = api_instance.post_forbidden_property_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_forbidden_property_request_body: %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 +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 +------------- | ------------- | ------------- +[**ForbiddenProperty**](ForbiddenProperty.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_forbidden_property_response_body_for_content_types** +> ForbiddenProperty post_forbidden_property_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.forbidden_property import ForbiddenProperty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_forbidden_property_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_forbidden_property_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ForbiddenProperty**](ForbiddenProperty.md) | | + + + +[**ForbiddenProperty**](ForbiddenProperty.md) + +### Authorization + +No authorization required + +[[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) + +# **post_hostname_format_request_body** +> post_hostname_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_hostname_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_hostname_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_hostname_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_hostname_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_hostname_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_hostname_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_integer_type_matches_integers_request_body** +> post_integer_type_matches_integers_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = 1 + try: + api_response = api_instance.post_integer_type_matches_integers_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_integer_type_matches_integers_request_body: %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 +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 +------------- | ------------- | ------------- +**int** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_integer_type_matches_integers_response_body_for_content_types** +> int post_integer_type_matches_integers_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_integer_type_matches_integers_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_integer_type_matches_integers_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + + +**int** + +### Authorization + +No authorization required + +[[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) + +# **post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body** +> post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(1) + try: + api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %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 +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 +------------- | ------------- | ------------- +[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types** +> InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | + + + +[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) + +### Authorization + +No authorization required + +[[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) + +# **post_invalid_string_value_for_default_request_body** +> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = InvalidStringValueForDefault(None) + try: + api_response = api_instance.post_invalid_string_value_for_default_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_invalid_string_value_for_default_request_body: %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 +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 +------------- | ------------- | ------------- +[**InvalidStringValueForDefault**](InvalidStringValueForDefault.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_invalid_string_value_for_default_response_body_for_content_types** +> InvalidStringValueForDefault post_invalid_string_value_for_default_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_invalid_string_value_for_default_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_invalid_string_value_for_default_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**InvalidStringValueForDefault**](InvalidStringValueForDefault.md) | | + + + +[**InvalidStringValueForDefault**](InvalidStringValueForDefault.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ipv4_format_request_body** +> post_ipv4_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_ipv4_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ipv4_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ipv4_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_ipv4_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ipv4_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ipv4_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_ipv6_format_request_body** +> post_ipv6_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_ipv6_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ipv6_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ipv6_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_ipv6_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ipv6_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ipv6_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_json_pointer_format_request_body** +> post_json_pointer_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_json_pointer_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_json_pointer_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_json_pointer_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_json_pointer_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_json_pointer_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_json_pointer_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_maximum_validation_request_body** +> post_maximum_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maximum_validation import MaximumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = MaximumValidation(None) + try: + api_response = api_instance.post_maximum_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maximum_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MaximumValidation**](MaximumValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maximum_validation_response_body_for_content_types** +> MaximumValidation post_maximum_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maximum_validation import MaximumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maximum_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maximum_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaximumValidation**](MaximumValidation.md) | | + + + +[**MaximumValidation**](MaximumValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maximum_validation_with_unsigned_integer_request_body** +> post_maximum_validation_with_unsigned_integer_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = MaximumValidationWithUnsignedInteger(None) + try: + api_response = api_instance.post_maximum_validation_with_unsigned_integer_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maximum_validation_with_unsigned_integer_request_body: %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 +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 +------------- | ------------- | ------------- +[**MaximumValidationWithUnsignedInteger**](MaximumValidationWithUnsignedInteger.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maximum_validation_with_unsigned_integer_response_body_for_content_types** +> MaximumValidationWithUnsignedInteger post_maximum_validation_with_unsigned_integer_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maximum_validation_with_unsigned_integer_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maximum_validation_with_unsigned_integer_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaximumValidationWithUnsignedInteger**](MaximumValidationWithUnsignedInteger.md) | | + + + +[**MaximumValidationWithUnsignedInteger**](MaximumValidationWithUnsignedInteger.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxitems_validation_request_body** +> post_maxitems_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maxitems_validation import MaxitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = MaxitemsValidation(None) + try: + api_response = api_instance.post_maxitems_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maxitems_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MaxitemsValidation**](MaxitemsValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maxitems_validation_response_body_for_content_types** +> MaxitemsValidation post_maxitems_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maxitems_validation import MaxitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxitems_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maxitems_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaxitemsValidation**](MaxitemsValidation.md) | | + + + +[**MaxitemsValidation**](MaxitemsValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxlength_validation_request_body** +> post_maxlength_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maxlength_validation import MaxlengthValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = MaxlengthValidation(None) + try: + api_response = api_instance.post_maxlength_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maxlength_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MaxlengthValidation**](MaxlengthValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maxlength_validation_response_body_for_content_types** +> MaxlengthValidation post_maxlength_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maxlength_validation import MaxlengthValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxlength_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maxlength_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaxlengthValidation**](MaxlengthValidation.md) | | + + + +[**MaxlengthValidation**](MaxlengthValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxproperties0_means_the_object_is_empty_request_body** +> post_maxproperties0_means_the_object_is_empty_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = Maxproperties0MeansTheObjectIsEmpty(None) + try: + api_response = api_instance.post_maxproperties0_means_the_object_is_empty_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maxproperties0_means_the_object_is_empty_request_body: %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 +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 +------------- | ------------- | ------------- +[**Maxproperties0MeansTheObjectIsEmpty**](Maxproperties0MeansTheObjectIsEmpty.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maxproperties0_means_the_object_is_empty_response_body_for_content_types** +> Maxproperties0MeansTheObjectIsEmpty post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maxproperties0_means_the_object_is_empty_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Maxproperties0MeansTheObjectIsEmpty**](Maxproperties0MeansTheObjectIsEmpty.md) | | + + + +[**Maxproperties0MeansTheObjectIsEmpty**](Maxproperties0MeansTheObjectIsEmpty.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxproperties_validation_request_body** +> post_maxproperties_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = MaxpropertiesValidation(None) + try: + api_response = api_instance.post_maxproperties_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maxproperties_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MaxpropertiesValidation**](MaxpropertiesValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maxproperties_validation_response_body_for_content_types** +> MaxpropertiesValidation post_maxproperties_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxproperties_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_maxproperties_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaxpropertiesValidation**](MaxpropertiesValidation.md) | | + + + +[**MaxpropertiesValidation**](MaxpropertiesValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minimum_validation_request_body** +> post_minimum_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.minimum_validation import MinimumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = MinimumValidation(None) + try: + api_response = api_instance.post_minimum_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_minimum_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MinimumValidation**](MinimumValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_minimum_validation_response_body_for_content_types** +> MinimumValidation post_minimum_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.minimum_validation import MinimumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minimum_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_minimum_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinimumValidation**](MinimumValidation.md) | | + + + +[**MinimumValidation**](MinimumValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minimum_validation_with_signed_integer_request_body** +> post_minimum_validation_with_signed_integer_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = MinimumValidationWithSignedInteger(None) + try: + api_response = api_instance.post_minimum_validation_with_signed_integer_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_minimum_validation_with_signed_integer_request_body: %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 +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 +------------- | ------------- | ------------- +[**MinimumValidationWithSignedInteger**](MinimumValidationWithSignedInteger.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_minimum_validation_with_signed_integer_response_body_for_content_types** +> MinimumValidationWithSignedInteger post_minimum_validation_with_signed_integer_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minimum_validation_with_signed_integer_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_minimum_validation_with_signed_integer_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinimumValidationWithSignedInteger**](MinimumValidationWithSignedInteger.md) | | + + + +[**MinimumValidationWithSignedInteger**](MinimumValidationWithSignedInteger.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minitems_validation_request_body** +> post_minitems_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.minitems_validation import MinitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = MinitemsValidation(None) + try: + api_response = api_instance.post_minitems_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_minitems_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MinitemsValidation**](MinitemsValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_minitems_validation_response_body_for_content_types** +> MinitemsValidation post_minitems_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.minitems_validation import MinitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minitems_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_minitems_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinitemsValidation**](MinitemsValidation.md) | | + + + +[**MinitemsValidation**](MinitemsValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minlength_validation_request_body** +> post_minlength_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.minlength_validation import MinlengthValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = MinlengthValidation(None) + try: + api_response = api_instance.post_minlength_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_minlength_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MinlengthValidation**](MinlengthValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_minlength_validation_response_body_for_content_types** +> MinlengthValidation post_minlength_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.minlength_validation import MinlengthValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minlength_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_minlength_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinlengthValidation**](MinlengthValidation.md) | | + + + +[**MinlengthValidation**](MinlengthValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minproperties_validation_request_body** +> post_minproperties_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.minproperties_validation import MinpropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = MinpropertiesValidation(None) + try: + api_response = api_instance.post_minproperties_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_minproperties_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MinpropertiesValidation**](MinpropertiesValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_minproperties_validation_response_body_for_content_types** +> MinpropertiesValidation post_minproperties_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.minproperties_validation import MinpropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minproperties_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_minproperties_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinpropertiesValidation**](MinpropertiesValidation.md) | | + + + +[**MinpropertiesValidation**](MinpropertiesValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_allof_to_check_validation_semantics_request_body** +> post_nested_allof_to_check_validation_semantics_request_body(nested_allof_to_check_validation_semantics) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = NestedAllofToCheckValidationSemantics(None) + try: + api_response = api_instance.post_nested_allof_to_check_validation_semantics_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_nested_allof_to_check_validation_semantics_request_body: %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 +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 +------------- | ------------- | ------------- +[**NestedAllofToCheckValidationSemantics**](NestedAllofToCheckValidationSemantics.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_allof_to_check_validation_semantics_response_body_for_content_types** +> NestedAllofToCheckValidationSemantics post_nested_allof_to_check_validation_semantics_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_allof_to_check_validation_semantics_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_nested_allof_to_check_validation_semantics_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedAllofToCheckValidationSemantics**](NestedAllofToCheckValidationSemantics.md) | | + + + +[**NestedAllofToCheckValidationSemantics**](NestedAllofToCheckValidationSemantics.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_anyof_to_check_validation_semantics_request_body** +> post_nested_anyof_to_check_validation_semantics_request_body(nested_anyof_to_check_validation_semantics) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = NestedAnyofToCheckValidationSemantics(None) + try: + api_response = api_instance.post_nested_anyof_to_check_validation_semantics_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_nested_anyof_to_check_validation_semantics_request_body: %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 +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 +------------- | ------------- | ------------- +[**NestedAnyofToCheckValidationSemantics**](NestedAnyofToCheckValidationSemantics.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_anyof_to_check_validation_semantics_response_body_for_content_types** +> NestedAnyofToCheckValidationSemantics post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_nested_anyof_to_check_validation_semantics_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedAnyofToCheckValidationSemantics**](NestedAnyofToCheckValidationSemantics.md) | | + + + +[**NestedAnyofToCheckValidationSemantics**](NestedAnyofToCheckValidationSemantics.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_items_request_body** +> post_nested_items_request_body(nested_items) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.nested_items import NestedItems +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = NestedItems([ + [ + [ + [ + 3.14 + ] + ] + ] + ]) + try: + api_response = api_instance.post_nested_items_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_nested_items_request_body: %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 +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 +------------- | ------------- | ------------- +[**NestedItems**](NestedItems.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_items_response_body_for_content_types** +> NestedItems post_nested_items_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.nested_items import NestedItems +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_items_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_nested_items_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedItems**](NestedItems.md) | | + + + +[**NestedItems**](NestedItems.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_oneof_to_check_validation_semantics_request_body** +> post_nested_oneof_to_check_validation_semantics_request_body(nested_oneof_to_check_validation_semantics) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = NestedOneofToCheckValidationSemantics(None) + try: + api_response = api_instance.post_nested_oneof_to_check_validation_semantics_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_nested_oneof_to_check_validation_semantics_request_body: %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 +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 +------------- | ------------- | ------------- +[**NestedOneofToCheckValidationSemantics**](NestedOneofToCheckValidationSemantics.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_oneof_to_check_validation_semantics_response_body_for_content_types** +> NestedOneofToCheckValidationSemantics post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_nested_oneof_to_check_validation_semantics_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedOneofToCheckValidationSemantics**](NestedOneofToCheckValidationSemantics.md) | | + + + +[**NestedOneofToCheckValidationSemantics**](NestedOneofToCheckValidationSemantics.md) + +### Authorization + +No authorization required + +[[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) + +# **post_not_more_complex_schema_request_body** +> post_not_more_complex_schema_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_not_more_complex_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_not_more_complex_schema_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_not_more_complex_schema_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_not_more_complex_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_not_more_complex_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_not_request_body** +> post_not_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_not_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_not_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_not_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_not_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_not_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_not_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_nul_characters_in_strings_request_body** +> post_nul_characters_in_strings_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = NulCharactersInStrings("hellothere") + try: + api_response = api_instance.post_nul_characters_in_strings_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_nul_characters_in_strings_request_body: %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 +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 +------------- | ------------- | ------------- +[**NulCharactersInStrings**](NulCharactersInStrings.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_nul_characters_in_strings_response_body_for_content_types** +> NulCharactersInStrings post_nul_characters_in_strings_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nul_characters_in_strings_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_nul_characters_in_strings_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NulCharactersInStrings**](NulCharactersInStrings.md) | | + + + +[**NulCharactersInStrings**](NulCharactersInStrings.md) + +### Authorization + +No authorization required + +[[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) + +# **post_null_type_matches_only_the_null_object_request_body** +> post_null_type_matches_only_the_null_object_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_null_type_matches_only_the_null_object_request_body: %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 +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 +------------- | ------------- | ------------- +**none_type** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_null_type_matches_only_the_null_object_response_body_for_content_types** +> none_type post_null_type_matches_only_the_null_object_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_null_type_matches_only_the_null_object_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_null_type_matches_only_the_null_object_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**none_type** | | + + +**none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_number_type_matches_numbers_request_body** +> post_number_type_matches_numbers_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = 3.14 + try: + api_response = api_instance.post_number_type_matches_numbers_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_number_type_matches_numbers_request_body: %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 +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 +------------- | ------------- | ------------- +**int, float** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_number_type_matches_numbers_response_body_for_content_types** +> int, float post_number_type_matches_numbers_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_number_type_matches_numbers_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_number_type_matches_numbers_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**int, float** | | + + +**int, float** + +### Authorization + +No authorization required + +[[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) + +# **post_object_properties_validation_request_body** +> post_object_properties_validation_request_body(object_properties_validation) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = ObjectPropertiesValidation(None) + try: + api_response = api_instance.post_object_properties_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_object_properties_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**ObjectPropertiesValidation**](ObjectPropertiesValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_object_properties_validation_response_body_for_content_types** +> ObjectPropertiesValidation post_object_properties_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_object_properties_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_object_properties_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectPropertiesValidation**](ObjectPropertiesValidation.md) | | + + + +[**ObjectPropertiesValidation**](ObjectPropertiesValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_object_type_matches_objects_request_body** +> post_object_type_matches_objects_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = dict() + try: + api_response = api_instance.post_object_type_matches_objects_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_object_type_matches_objects_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_object_type_matches_objects_response_body_for_content_types** +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} post_object_type_matches_objects_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_object_type_matches_objects_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_object_type_matches_objects_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_oneof_complex_types_request_body** +> post_oneof_complex_types_request_body(oneof_complex_types) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.oneof_complex_types import OneofComplexTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = OneofComplexTypes(None) + try: + api_response = api_instance.post_oneof_complex_types_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_oneof_complex_types_request_body: %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 +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 +------------- | ------------- | ------------- +[**OneofComplexTypes**](OneofComplexTypes.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_complex_types_response_body_for_content_types** +> OneofComplexTypes post_oneof_complex_types_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.oneof_complex_types import OneofComplexTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_complex_types_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_oneof_complex_types_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OneofComplexTypes**](OneofComplexTypes.md) | | + + + +[**OneofComplexTypes**](OneofComplexTypes.md) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_request_body** +> post_oneof_request_body(oneof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.oneof import Oneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = Oneof(None) + try: + api_response = api_instance.post_oneof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_oneof_request_body: %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 +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 +------------- | ------------- | ------------- +[**Oneof**](Oneof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_response_body_for_content_types** +> Oneof post_oneof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.oneof import Oneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_oneof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Oneof**](Oneof.md) | | + + + +[**Oneof**](Oneof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_with_base_schema_request_body** +> post_oneof_with_base_schema_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = OneofWithBaseSchema("body_example") + try: + api_response = api_instance.post_oneof_with_base_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_oneof_with_base_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**OneofWithBaseSchema**](OneofWithBaseSchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_with_base_schema_response_body_for_content_types** +> OneofWithBaseSchema post_oneof_with_base_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_with_base_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_oneof_with_base_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OneofWithBaseSchema**](OneofWithBaseSchema.md) | | + + + +[**OneofWithBaseSchema**](OneofWithBaseSchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_with_empty_schema_request_body** +> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = OneofWithEmptySchema(None) + try: + api_response = api_instance.post_oneof_with_empty_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_oneof_with_empty_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**OneofWithEmptySchema**](OneofWithEmptySchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_with_empty_schema_response_body_for_content_types** +> OneofWithEmptySchema post_oneof_with_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_with_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_oneof_with_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OneofWithEmptySchema**](OneofWithEmptySchema.md) | | + + + +[**OneofWithEmptySchema**](OneofWithEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_pattern_is_not_anchored_request_body** +> post_pattern_is_not_anchored_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = PatternIsNotAnchored(None) + try: + api_response = api_instance.post_pattern_is_not_anchored_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_pattern_is_not_anchored_request_body: %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 +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 +------------- | ------------- | ------------- +[**PatternIsNotAnchored**](PatternIsNotAnchored.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_pattern_is_not_anchored_response_body_for_content_types** +> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_pattern_is_not_anchored_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_pattern_is_not_anchored_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PatternIsNotAnchored**](PatternIsNotAnchored.md) | | + + + +[**PatternIsNotAnchored**](PatternIsNotAnchored.md) + +### Authorization + +No authorization required + +[[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) + +# **post_pattern_validation_request_body** +> post_pattern_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.pattern_validation import PatternValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = PatternValidation(None) + try: + api_response = api_instance.post_pattern_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_pattern_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**PatternValidation**](PatternValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_pattern_validation_response_body_for_content_types** +> PatternValidation post_pattern_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.pattern_validation import PatternValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_pattern_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_pattern_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PatternValidation**](PatternValidation.md) | | + + + +[**PatternValidation**](PatternValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_properties_with_escaped_characters_request_body** +> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = PropertiesWithEscapedCharacters(None) + try: + api_response = api_instance.post_properties_with_escaped_characters_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_properties_with_escaped_characters_request_body: %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 +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 +------------- | ------------- | ------------- +[**PropertiesWithEscapedCharacters**](PropertiesWithEscapedCharacters.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_properties_with_escaped_characters_response_body_for_content_types** +> PropertiesWithEscapedCharacters post_properties_with_escaped_characters_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_properties_with_escaped_characters_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_properties_with_escaped_characters_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PropertiesWithEscapedCharacters**](PropertiesWithEscapedCharacters.md) | | + + + +[**PropertiesWithEscapedCharacters**](PropertiesWithEscapedCharacters.md) + +### Authorization + +No authorization required + +[[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) + +# **post_property_named_ref_that_is_not_a_reference_request_body** +> post_property_named_ref_that_is_not_a_reference_request_body(property_named_ref_that_is_not_a_reference) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = PropertyNamedRefThatIsNotAReference(None) + try: + api_response = api_instance.post_property_named_ref_that_is_not_a_reference_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_property_named_ref_that_is_not_a_reference_request_body: %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 +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 +------------- | ------------- | ------------- +[**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_property_named_ref_that_is_not_a_reference_response_body_for_content_types** +> PropertyNamedRefThatIsNotAReference post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_property_named_ref_that_is_not_a_reference_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | + + + +[**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_additionalproperties_request_body** +> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInAdditionalproperties( + key=PropertyNamedRefThatIsNotAReference(None), + ) + try: + api_response = api_instance.post_ref_in_additionalproperties_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_additionalproperties_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInAdditionalproperties**](RefInAdditionalproperties.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_additionalproperties_response_body_for_content_types** +> RefInAdditionalproperties post_ref_in_additionalproperties_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_additionalproperties_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_additionalproperties_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInAdditionalproperties**](RefInAdditionalproperties.md) | | + + + +[**RefInAdditionalproperties**](RefInAdditionalproperties.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_allof_request_body** +> post_ref_in_allof_request_body(ref_in_allof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_allof import RefInAllof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInAllof(None) + try: + api_response = api_instance.post_ref_in_allof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_allof_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInAllof**](RefInAllof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_allof_response_body_for_content_types** +> RefInAllof post_ref_in_allof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_allof import RefInAllof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_allof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_allof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInAllof**](RefInAllof.md) | | + + + +[**RefInAllof**](RefInAllof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_anyof_request_body** +> post_ref_in_anyof_request_body(ref_in_anyof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_anyof import RefInAnyof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInAnyof(None) + try: + api_response = api_instance.post_ref_in_anyof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_anyof_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInAnyof**](RefInAnyof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_anyof_response_body_for_content_types** +> RefInAnyof post_ref_in_anyof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_anyof import RefInAnyof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_anyof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_anyof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInAnyof**](RefInAnyof.md) | | + + + +[**RefInAnyof**](RefInAnyof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_items_request_body** +> post_ref_in_items_request_body(ref_in_items) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_items import RefInItems +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInItems([ + PropertyNamedRefThatIsNotAReference(None) + ]) + try: + api_response = api_instance.post_ref_in_items_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_items_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInItems**](RefInItems.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_items_response_body_for_content_types** +> RefInItems post_ref_in_items_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_items import RefInItems +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_items_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_items_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInItems**](RefInItems.md) | | + + + +[**RefInItems**](RefInItems.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_oneof_request_body** +> post_ref_in_oneof_request_body(ref_in_oneof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_oneof import RefInOneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInOneof(None) + try: + api_response = api_instance.post_ref_in_oneof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_oneof_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInOneof**](RefInOneof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_oneof_response_body_for_content_types** +> RefInOneof post_ref_in_oneof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_oneof import RefInOneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_oneof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_oneof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInOneof**](RefInOneof.md) | | + + + +[**RefInOneof**](RefInOneof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_property_request_body** +> post_ref_in_property_request_body(ref_in_property) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_property import RefInProperty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInProperty(None) + try: + api_response = api_instance.post_ref_in_property_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_property_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInProperty**](RefInProperty.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_property_response_body_for_content_types** +> RefInProperty post_ref_in_property_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.ref_in_property import RefInProperty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_property_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_ref_in_property_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInProperty**](RefInProperty.md) | | + + + +[**RefInProperty**](RefInProperty.md) + +### Authorization + +No authorization required + +[[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) + +# **post_required_default_validation_request_body** +> post_required_default_validation_request_body(required_default_validation) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.required_default_validation import RequiredDefaultValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = RequiredDefaultValidation(None) + try: + api_response = api_instance.post_required_default_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_required_default_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**RequiredDefaultValidation**](RequiredDefaultValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_required_default_validation_response_body_for_content_types** +> RequiredDefaultValidation post_required_default_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.required_default_validation import RequiredDefaultValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_required_default_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_required_default_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredDefaultValidation**](RequiredDefaultValidation.md) | | + + + +[**RequiredDefaultValidation**](RequiredDefaultValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_required_validation_request_body** +> post_required_validation_request_body(required_validation) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.required_validation import RequiredValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = RequiredValidation(None) + try: + api_response = api_instance.post_required_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_required_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**RequiredValidation**](RequiredValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_required_validation_response_body_for_content_types** +> RequiredValidation post_required_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.required_validation import RequiredValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_required_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_required_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredValidation**](RequiredValidation.md) | | + + + +[**RequiredValidation**](RequiredValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_required_with_empty_array_request_body** +> post_required_with_empty_array_request_body(required_with_empty_array) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = RequiredWithEmptyArray(None) + try: + api_response = api_instance.post_required_with_empty_array_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_required_with_empty_array_request_body: %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 +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 +------------- | ------------- | ------------- +[**RequiredWithEmptyArray**](RequiredWithEmptyArray.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_required_with_empty_array_response_body_for_content_types** +> RequiredWithEmptyArray post_required_with_empty_array_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_required_with_empty_array_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_required_with_empty_array_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredWithEmptyArray**](RequiredWithEmptyArray.md) | | + + + +[**RequiredWithEmptyArray**](RequiredWithEmptyArray.md) + +### Authorization + +No authorization required + +[[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) + +# **post_simple_enum_validation_request_body** +> post_simple_enum_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.simple_enum_validation import SimpleEnumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = SimpleEnumValidation(1) + try: + api_response = api_instance.post_simple_enum_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_simple_enum_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**SimpleEnumValidation**](SimpleEnumValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_simple_enum_validation_response_body_for_content_types** +> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.simple_enum_validation import SimpleEnumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_simple_enum_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_simple_enum_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**SimpleEnumValidation**](SimpleEnumValidation.md) | | + + + +[**SimpleEnumValidation**](SimpleEnumValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_string_type_matches_strings_request_body** +> post_string_type_matches_strings_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = "body_example" + try: + api_response = api_instance.post_string_type_matches_strings_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_string_type_matches_strings_request_body: %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 +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 +------------- | ------------- | ------------- +**str** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_string_type_matches_strings_response_body_for_content_types** +> str post_string_type_matches_strings_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_string_type_matches_strings_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_string_type_matches_strings_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + + +**str** + +### Authorization + +No authorization required + +[[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) + +# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body** +> post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(the_default_keyword_does_not_do_anything_if_the_property_is_missing) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( + alpha=5, + ) + try: + api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %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 +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 +------------- | ------------- | ------------- +[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types** +> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | + + + +[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) + +### Authorization + +No authorization required + +[[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) + +# **post_uniqueitems_false_validation_request_body** +> post_uniqueitems_false_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = UniqueitemsFalseValidation(None) + try: + api_response = api_instance.post_uniqueitems_false_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_uniqueitems_false_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**UniqueitemsFalseValidation**](UniqueitemsFalseValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_uniqueitems_false_validation_response_body_for_content_types** +> UniqueitemsFalseValidation post_uniqueitems_false_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uniqueitems_false_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_uniqueitems_false_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UniqueitemsFalseValidation**](UniqueitemsFalseValidation.md) | | + + + +[**UniqueitemsFalseValidation**](UniqueitemsFalseValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_uniqueitems_validation_request_body** +> post_uniqueitems_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = UniqueitemsValidation(None) + try: + api_response = api_instance.post_uniqueitems_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_uniqueitems_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**UniqueitemsValidation**](UniqueitemsValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_uniqueitems_validation_response_body_for_content_types** +> UniqueitemsValidation post_uniqueitems_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uniqueitems_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_uniqueitems_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UniqueitemsValidation**](UniqueitemsValidation.md) | | + + + +[**UniqueitemsValidation**](UniqueitemsValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_uri_format_request_body** +> post_uri_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_uri_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_uri_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_uri_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_uri_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uri_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_uri_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_uri_reference_format_request_body** +> post_uri_reference_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_uri_reference_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_uri_reference_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_uri_reference_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_uri_reference_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uri_reference_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_uri_reference_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_uri_template_format_request_body** +> post_uri_template_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_uri_template_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_uri_template_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_uri_template_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_uri_template_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import content_type_json_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = content_type_json_api.ContentTypeJsonApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uri_template_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ContentTypeJsonApi->post_uri_template_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/JsonApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/JsonApi.md deleted file mode 100644 index 1048f339a8a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/JsonApi.md +++ /dev/null @@ -1,6243 +0,0 @@ -# unit_test_api.JsonApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](JsonApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -[**post_additionalproperties_are_allowed_by_default_request_body**](JsonApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -[**post_additionalproperties_can_exist_by_itself_request_body**](JsonApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -[**post_additionalproperties_should_not_look_in_applicators_request_body**](JsonApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -[**post_allof_combined_with_anyof_oneof_request_body**](JsonApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -[**post_allof_request_body**](JsonApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | -[**post_allof_simple_types_request_body**](JsonApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | -[**post_allof_with_base_schema_request_body**](JsonApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | -[**post_allof_with_one_empty_schema_request_body**](JsonApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | -[**post_allof_with_the_first_empty_schema_request_body**](JsonApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -[**post_allof_with_the_last_empty_schema_request_body**](JsonApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -[**post_allof_with_two_empty_schemas_request_body**](JsonApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -[**post_anyof_complex_types_request_body**](JsonApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | -[**post_anyof_request_body**](JsonApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | -[**post_anyof_with_base_schema_request_body**](JsonApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | -[**post_anyof_with_one_empty_schema_request_body**](JsonApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -[**post_array_type_matches_arrays_request_body**](JsonApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | -[**post_boolean_type_matches_booleans_request_body**](JsonApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -[**post_by_int_request_body**](JsonApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | -[**post_by_number_request_body**](JsonApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | -[**post_by_small_number_request_body**](JsonApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | -[**post_date_time_format_request_body**](JsonApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | -[**post_email_format_request_body**](JsonApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | -[**post_enum_with0_does_not_match_false_request_body**](JsonApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -[**post_enum_with1_does_not_match_true_request_body**](JsonApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -[**post_enum_with_escaped_characters_request_body**](JsonApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | -[**post_enum_with_false_does_not_match0_request_body**](JsonApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -[**post_enum_with_true_does_not_match1_request_body**](JsonApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -[**post_enums_in_properties_request_body**](JsonApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | -[**post_forbidden_property_request_body**](JsonApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | -[**post_hostname_format_request_body**](JsonApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | -[**post_integer_type_matches_integers_request_body**](JsonApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -[**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](JsonApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -[**post_invalid_string_value_for_default_request_body**](JsonApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | -[**post_ipv4_format_request_body**](JsonApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | -[**post_ipv6_format_request_body**](JsonApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | -[**post_json_pointer_format_request_body**](JsonApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | -[**post_maximum_validation_request_body**](JsonApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | -[**post_maximum_validation_with_unsigned_integer_request_body**](JsonApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -[**post_maxitems_validation_request_body**](JsonApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | -[**post_maxlength_validation_request_body**](JsonApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | -[**post_maxproperties0_means_the_object_is_empty_request_body**](JsonApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -[**post_maxproperties_validation_request_body**](JsonApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | -[**post_minimum_validation_request_body**](JsonApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | -[**post_minimum_validation_with_signed_integer_request_body**](JsonApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -[**post_minitems_validation_request_body**](JsonApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | -[**post_minlength_validation_request_body**](JsonApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | -[**post_minproperties_validation_request_body**](JsonApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | -[**post_nested_allof_to_check_validation_semantics_request_body**](JsonApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -[**post_nested_anyof_to_check_validation_semantics_request_body**](JsonApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -[**post_nested_items_request_body**](JsonApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | -[**post_nested_oneof_to_check_validation_semantics_request_body**](JsonApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -[**post_not_more_complex_schema_request_body**](JsonApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | -[**post_not_request_body**](JsonApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | -[**post_nul_characters_in_strings_request_body**](JsonApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | -[**post_null_type_matches_only_the_null_object_request_body**](JsonApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -[**post_number_type_matches_numbers_request_body**](JsonApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | -[**post_object_properties_validation_request_body**](JsonApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | -[**post_object_type_matches_objects_request_body**](JsonApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | -[**post_oneof_complex_types_request_body**](JsonApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | -[**post_oneof_request_body**](JsonApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | -[**post_oneof_with_base_schema_request_body**](JsonApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | -[**post_oneof_with_empty_schema_request_body**](JsonApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | -[**post_pattern_is_not_anchored_request_body**](JsonApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | -[**post_pattern_validation_request_body**](JsonApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | -[**post_properties_with_escaped_characters_request_body**](JsonApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -[**post_property_named_ref_that_is_not_a_reference_request_body**](JsonApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -[**post_ref_in_additionalproperties_request_body**](JsonApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | -[**post_ref_in_allof_request_body**](JsonApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | -[**post_ref_in_anyof_request_body**](JsonApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | -[**post_ref_in_items_request_body**](JsonApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | -[**post_ref_in_oneof_request_body**](JsonApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | -[**post_ref_in_property_request_body**](JsonApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | -[**post_required_default_validation_request_body**](JsonApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | -[**post_required_validation_request_body**](JsonApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | -[**post_required_with_empty_array_request_body**](JsonApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | -[**post_simple_enum_validation_request_body**](JsonApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | -[**post_string_type_matches_strings_request_body**](JsonApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | -[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](JsonApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -[**post_uniqueitems_false_validation_request_body**](JsonApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | -[**post_uniqueitems_validation_request_body**](JsonApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | -[**post_uri_format_request_body**](JsonApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | -[**post_uri_reference_format_request_body**](JsonApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | -[**post_uri_template_format_request_body**](JsonApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | - -# **post_additionalproperties_allows_a_schema_which_should_validate_request_body** -> post_additionalproperties_allows_a_schema_which_should_validate_request_body(additionalproperties_allows_a_schema_which_should_validate) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAllowsASchemaWhichShouldValidate( - foo=None, - bar=None, - ) - try: - api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %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 -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 -------------- | ------------- | ------------- -[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_additionalproperties_are_allowed_by_default_request_body** -> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAreAllowedByDefault(None) - try: - api_response = api_instance.post_additionalproperties_are_allowed_by_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_additionalproperties_are_allowed_by_default_request_body: %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 -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 -------------- | ------------- | ------------- -[**AdditionalpropertiesAreAllowedByDefault**](AdditionalpropertiesAreAllowedByDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_additionalproperties_can_exist_by_itself_request_body** -> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesCanExistByItself( - key=True, - ) - try: - api_response = api_instance.post_additionalproperties_can_exist_by_itself_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_additionalproperties_can_exist_by_itself_request_body: %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 -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 -------------- | ------------- | ------------- -[**AdditionalpropertiesCanExistByItself**](AdditionalpropertiesCanExistByItself.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_additionalproperties_should_not_look_in_applicators_request_body** -> post_additionalproperties_should_not_look_in_applicators_request_body(additionalproperties_should_not_look_in_applicators) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesShouldNotLookInApplicators(None) - try: - api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_additionalproperties_should_not_look_in_applicators_request_body: %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 -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 -------------- | ------------- | ------------- -[**AdditionalpropertiesShouldNotLookInApplicators**](AdditionalpropertiesShouldNotLookInApplicators.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_combined_with_anyof_oneof_request_body** -> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofCombinedWithAnyofOneof(None) - try: - api_response = api_instance.post_allof_combined_with_anyof_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_allof_combined_with_anyof_oneof_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofCombinedWithAnyofOneof**](AllofCombinedWithAnyofOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_request_body** -> post_allof_request_body(allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.allof import Allof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = Allof(None) - try: - api_response = api_instance.post_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_allof_request_body: %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 -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 -------------- | ------------- | ------------- -[**Allof**](Allof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_simple_types_request_body** -> post_allof_simple_types_request_body(allof_simple_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofSimpleTypes(None) - try: - api_response = api_instance.post_allof_simple_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_allof_simple_types_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofSimpleTypes**](AllofSimpleTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_with_base_schema_request_body** -> post_allof_with_base_schema_request_body(allof_with_base_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithBaseSchema({}) - try: - api_response = api_instance.post_allof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_allof_with_base_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofWithBaseSchema**](AllofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_with_one_empty_schema_request_body** -> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithOneEmptySchema(None) - try: - api_response = api_instance.post_allof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_allof_with_one_empty_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofWithOneEmptySchema**](AllofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_with_the_first_empty_schema_request_body** -> post_allof_with_the_first_empty_schema_request_body(allof_with_the_first_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheFirstEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_first_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_allof_with_the_first_empty_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofWithTheFirstEmptySchema**](AllofWithTheFirstEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_with_the_last_empty_schema_request_body** -> post_allof_with_the_last_empty_schema_request_body(allof_with_the_last_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheLastEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_last_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_allof_with_the_last_empty_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofWithTheLastEmptySchema**](AllofWithTheLastEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_with_two_empty_schemas_request_body** -> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTwoEmptySchemas(None) - try: - api_response = api_instance.post_allof_with_two_empty_schemas_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_allof_with_two_empty_schemas_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofWithTwoEmptySchemas**](AllofWithTwoEmptySchemas.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_anyof_complex_types_request_body** -> post_anyof_complex_types_request_body(anyof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofComplexTypes(None) - try: - api_response = api_instance.post_anyof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_anyof_complex_types_request_body: %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 -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 -------------- | ------------- | ------------- -[**AnyofComplexTypes**](AnyofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_anyof_request_body** -> post_anyof_request_body(anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.anyof import Anyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = Anyof(None) - try: - api_response = api_instance.post_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_anyof_request_body: %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 -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 -------------- | ------------- | ------------- -[**Anyof**](Anyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_anyof_with_base_schema_request_body** -> post_anyof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithBaseSchema("body_example") - try: - api_response = api_instance.post_anyof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_anyof_with_base_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AnyofWithBaseSchema**](AnyofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_anyof_with_one_empty_schema_request_body** -> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithOneEmptySchema(None) - try: - api_response = api_instance.post_anyof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_anyof_with_one_empty_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AnyofWithOneEmptySchema**](AnyofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_array_type_matches_arrays_request_body** -> post_array_type_matches_arrays_request_body(array_type_matches_arrays) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = ArrayTypeMatchesArrays([ - None - ]) - try: - api_response = api_instance.post_array_type_matches_arrays_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_array_type_matches_arrays_request_body: %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 -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 -------------- | ------------- | ------------- -[**ArrayTypeMatchesArrays**](ArrayTypeMatchesArrays.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_boolean_type_matches_booleans_request_body** -> post_boolean_type_matches_booleans_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = True - try: - api_response = api_instance.post_boolean_type_matches_booleans_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_boolean_type_matches_booleans_request_body: %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 -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 -------------- | ------------- | ------------- -**bool** | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_by_int_request_body** -> post_by_int_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.by_int import ByInt -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = ByInt(None) - try: - api_response = api_instance.post_by_int_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_by_int_request_body: %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 -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 -------------- | ------------- | ------------- -[**ByInt**](ByInt.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_by_number_request_body** -> post_by_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.by_number import ByNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = ByNumber(None) - try: - api_response = api_instance.post_by_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_by_number_request_body: %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 -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 -------------- | ------------- | ------------- -[**ByNumber**](ByNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_by_small_number_request_body** -> post_by_small_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.by_small_number import BySmallNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = BySmallNumber(None) - try: - api_response = api_instance.post_by_small_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_by_small_number_request_body: %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 -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 -------------- | ------------- | ------------- -[**BySmallNumber**](BySmallNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_date_time_format_request_body** -> post_date_time_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_date_time_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_date_time_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_email_format_request_body** -> post_email_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_email_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_email_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enum_with0_does_not_match_false_request_body** -> post_enum_with0_does_not_match_false_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith0DoesNotMatchFalse(0) - try: - api_response = api_instance.post_enum_with0_does_not_match_false_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_enum_with0_does_not_match_false_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumWith0DoesNotMatchFalse**](EnumWith0DoesNotMatchFalse.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enum_with1_does_not_match_true_request_body** -> post_enum_with1_does_not_match_true_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith1DoesNotMatchTrue(1) - try: - api_response = api_instance.post_enum_with1_does_not_match_true_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_enum_with1_does_not_match_true_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumWith1DoesNotMatchTrue**](EnumWith1DoesNotMatchTrue.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enum_with_escaped_characters_request_body** -> post_enum_with_escaped_characters_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithEscapedCharacters("foo -bar") - try: - api_response = api_instance.post_enum_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_enum_with_escaped_characters_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumWithEscapedCharacters**](EnumWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enum_with_false_does_not_match0_request_body** -> post_enum_with_false_does_not_match0_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithFalseDoesNotMatch0(False) - try: - api_response = api_instance.post_enum_with_false_does_not_match0_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_enum_with_false_does_not_match0_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumWithFalseDoesNotMatch0**](EnumWithFalseDoesNotMatch0.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enum_with_true_does_not_match1_request_body** -> post_enum_with_true_does_not_match1_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithTrueDoesNotMatch1(True) - try: - api_response = api_instance.post_enum_with_true_does_not_match1_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_enum_with_true_does_not_match1_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumWithTrueDoesNotMatch1**](EnumWithTrueDoesNotMatch1.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enums_in_properties_request_body** -> post_enums_in_properties_request_body(enums_in_properties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.enums_in_properties import EnumsInProperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumsInProperties( - foo="foo", - bar="bar", - ) - try: - api_response = api_instance.post_enums_in_properties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_enums_in_properties_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumsInProperties**](EnumsInProperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_forbidden_property_request_body** -> post_forbidden_property_request_body(forbidden_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.forbidden_property import ForbiddenProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = ForbiddenProperty(None) - try: - api_response = api_instance.post_forbidden_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_forbidden_property_request_body: %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 -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 -------------- | ------------- | ------------- -[**ForbiddenProperty**](ForbiddenProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_hostname_format_request_body** -> post_hostname_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_hostname_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_hostname_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_integer_type_matches_integers_request_body** -> post_integer_type_matches_integers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = 1 - try: - api_response = api_instance.post_integer_type_matches_integers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_integer_type_matches_integers_request_body: %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 -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 -------------- | ------------- | ------------- -**int** | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body** -> post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(1) - try: - api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %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 -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 -------------- | ------------- | ------------- -[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_invalid_string_value_for_default_request_body** -> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidStringValueForDefault(None) - try: - api_response = api_instance.post_invalid_string_value_for_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_invalid_string_value_for_default_request_body: %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 -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 -------------- | ------------- | ------------- -[**InvalidStringValueForDefault**](InvalidStringValueForDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ipv4_format_request_body** -> post_ipv4_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv4_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_ipv4_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ipv6_format_request_body** -> post_ipv6_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv6_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_ipv6_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_json_pointer_format_request_body** -> post_json_pointer_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_json_pointer_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_json_pointer_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maximum_validation_request_body** -> post_maximum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.maximum_validation import MaximumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidation(None) - try: - api_response = api_instance.post_maximum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_maximum_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MaximumValidation**](MaximumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maximum_validation_with_unsigned_integer_request_body** -> post_maximum_validation_with_unsigned_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidationWithUnsignedInteger(None) - try: - api_response = api_instance.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_maximum_validation_with_unsigned_integer_request_body: %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 -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 -------------- | ------------- | ------------- -[**MaximumValidationWithUnsignedInteger**](MaximumValidationWithUnsignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maxitems_validation_request_body** -> post_maxitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxitemsValidation(None) - try: - api_response = api_instance.post_maxitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_maxitems_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MaxitemsValidation**](MaxitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maxlength_validation_request_body** -> post_maxlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxlengthValidation(None) - try: - api_response = api_instance.post_maxlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_maxlength_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MaxlengthValidation**](MaxlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maxproperties0_means_the_object_is_empty_request_body** -> post_maxproperties0_means_the_object_is_empty_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = Maxproperties0MeansTheObjectIsEmpty(None) - try: - api_response = api_instance.post_maxproperties0_means_the_object_is_empty_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_maxproperties0_means_the_object_is_empty_request_body: %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 -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 -------------- | ------------- | ------------- -[**Maxproperties0MeansTheObjectIsEmpty**](Maxproperties0MeansTheObjectIsEmpty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maxproperties_validation_request_body** -> post_maxproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxpropertiesValidation(None) - try: - api_response = api_instance.post_maxproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_maxproperties_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MaxpropertiesValidation**](MaxpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_minimum_validation_request_body** -> post_minimum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.minimum_validation import MinimumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidation(None) - try: - api_response = api_instance.post_minimum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_minimum_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MinimumValidation**](MinimumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_minimum_validation_with_signed_integer_request_body** -> post_minimum_validation_with_signed_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidationWithSignedInteger(None) - try: - api_response = api_instance.post_minimum_validation_with_signed_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_minimum_validation_with_signed_integer_request_body: %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 -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 -------------- | ------------- | ------------- -[**MinimumValidationWithSignedInteger**](MinimumValidationWithSignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_minitems_validation_request_body** -> post_minitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.minitems_validation import MinitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MinitemsValidation(None) - try: - api_response = api_instance.post_minitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_minitems_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MinitemsValidation**](MinitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_minlength_validation_request_body** -> post_minlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.minlength_validation import MinlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MinlengthValidation(None) - try: - api_response = api_instance.post_minlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_minlength_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MinlengthValidation**](MinlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_minproperties_validation_request_body** -> post_minproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MinpropertiesValidation(None) - try: - api_response = api_instance.post_minproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_minproperties_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MinpropertiesValidation**](MinpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_nested_allof_to_check_validation_semantics_request_body** -> post_nested_allof_to_check_validation_semantics_request_body(nested_allof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAllofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_allof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_nested_allof_to_check_validation_semantics_request_body: %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 -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 -------------- | ------------- | ------------- -[**NestedAllofToCheckValidationSemantics**](NestedAllofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_nested_anyof_to_check_validation_semantics_request_body** -> post_nested_anyof_to_check_validation_semantics_request_body(nested_anyof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAnyofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_anyof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_nested_anyof_to_check_validation_semantics_request_body: %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 -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 -------------- | ------------- | ------------- -[**NestedAnyofToCheckValidationSemantics**](NestedAnyofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_nested_items_request_body** -> post_nested_items_request_body(nested_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.nested_items import NestedItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedItems([ - [ - [ - [ - 3.14 - ] - ] - ] - ]) - try: - api_response = api_instance.post_nested_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_nested_items_request_body: %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 -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 -------------- | ------------- | ------------- -[**NestedItems**](NestedItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_nested_oneof_to_check_validation_semantics_request_body** -> post_nested_oneof_to_check_validation_semantics_request_body(nested_oneof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedOneofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_oneof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_nested_oneof_to_check_validation_semantics_request_body: %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 -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 -------------- | ------------- | ------------- -[**NestedOneofToCheckValidationSemantics**](NestedOneofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_not_more_complex_schema_request_body** -> post_not_more_complex_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_more_complex_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_not_more_complex_schema_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_not_request_body** -> post_not_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_not_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_nul_characters_in_strings_request_body** -> post_nul_characters_in_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = NulCharactersInStrings("hellothere") - try: - api_response = api_instance.post_nul_characters_in_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_nul_characters_in_strings_request_body: %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 -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 -------------- | ------------- | ------------- -[**NulCharactersInStrings**](NulCharactersInStrings.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_null_type_matches_only_the_null_object_request_body** -> post_null_type_matches_only_the_null_object_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_null_type_matches_only_the_null_object_request_body: %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 -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 -------------- | ------------- | ------------- -**none_type** | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_number_type_matches_numbers_request_body** -> post_number_type_matches_numbers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = 3.14 - try: - api_response = api_instance.post_number_type_matches_numbers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_number_type_matches_numbers_request_body: %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 -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 -------------- | ------------- | ------------- -**int, float** | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_object_properties_validation_request_body** -> post_object_properties_validation_request_body(object_properties_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = ObjectPropertiesValidation(None) - try: - api_response = api_instance.post_object_properties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_object_properties_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**ObjectPropertiesValidation**](ObjectPropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_object_type_matches_objects_request_body** -> post_object_type_matches_objects_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = dict() - try: - api_response = api_instance.post_object_type_matches_objects_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_object_type_matches_objects_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_oneof_complex_types_request_body** -> post_oneof_complex_types_request_body(oneof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofComplexTypes(None) - try: - api_response = api_instance.post_oneof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_oneof_complex_types_request_body: %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 -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 -------------- | ------------- | ------------- -[**OneofComplexTypes**](OneofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_oneof_request_body** -> post_oneof_request_body(oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.oneof import Oneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = Oneof(None) - try: - api_response = api_instance.post_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_oneof_request_body: %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 -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 -------------- | ------------- | ------------- -[**Oneof**](Oneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_oneof_with_base_schema_request_body** -> post_oneof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithBaseSchema("body_example") - try: - api_response = api_instance.post_oneof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_oneof_with_base_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**OneofWithBaseSchema**](OneofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_oneof_with_empty_schema_request_body** -> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithEmptySchema(None) - try: - api_response = api_instance.post_oneof_with_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_oneof_with_empty_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**OneofWithEmptySchema**](OneofWithEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_pattern_is_not_anchored_request_body** -> post_pattern_is_not_anchored_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternIsNotAnchored(None) - try: - api_response = api_instance.post_pattern_is_not_anchored_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_pattern_is_not_anchored_request_body: %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 -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 -------------- | ------------- | ------------- -[**PatternIsNotAnchored**](PatternIsNotAnchored.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_pattern_validation_request_body** -> post_pattern_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.pattern_validation import PatternValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternValidation(None) - try: - api_response = api_instance.post_pattern_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_pattern_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**PatternValidation**](PatternValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_properties_with_escaped_characters_request_body** -> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertiesWithEscapedCharacters(None) - try: - api_response = api_instance.post_properties_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_properties_with_escaped_characters_request_body: %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 -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 -------------- | ------------- | ------------- -[**PropertiesWithEscapedCharacters**](PropertiesWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_property_named_ref_that_is_not_a_reference_request_body** -> post_property_named_ref_that_is_not_a_reference_request_body(property_named_ref_that_is_not_a_reference) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertyNamedRefThatIsNotAReference(None) - try: - api_response = api_instance.post_property_named_ref_that_is_not_a_reference_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_property_named_ref_that_is_not_a_reference_request_body: %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 -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 -------------- | ------------- | ------------- -[**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_additionalproperties_request_body** -> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAdditionalproperties( - key=PropertyNamedRefThatIsNotAReference(None), - ) - try: - api_response = api_instance.post_ref_in_additionalproperties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_ref_in_additionalproperties_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInAdditionalproperties**](RefInAdditionalproperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_allof_request_body** -> post_ref_in_allof_request_body(ref_in_allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.ref_in_allof import RefInAllof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAllof(None) - try: - api_response = api_instance.post_ref_in_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_ref_in_allof_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInAllof**](RefInAllof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_anyof_request_body** -> post_ref_in_anyof_request_body(ref_in_anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.ref_in_anyof import RefInAnyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAnyof(None) - try: - api_response = api_instance.post_ref_in_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_ref_in_anyof_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInAnyof**](RefInAnyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_items_request_body** -> post_ref_in_items_request_body(ref_in_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.ref_in_items import RefInItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInItems([ - PropertyNamedRefThatIsNotAReference(None) - ]) - try: - api_response = api_instance.post_ref_in_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_ref_in_items_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInItems**](RefInItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_oneof_request_body** -> post_ref_in_oneof_request_body(ref_in_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.ref_in_oneof import RefInOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInOneof(None) - try: - api_response = api_instance.post_ref_in_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_ref_in_oneof_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInOneof**](RefInOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_property_request_body** -> post_ref_in_property_request_body(ref_in_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.ref_in_property import RefInProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInProperty(None) - try: - api_response = api_instance.post_ref_in_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_ref_in_property_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInProperty**](RefInProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_required_default_validation_request_body** -> post_required_default_validation_request_body(required_default_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredDefaultValidation(None) - try: - api_response = api_instance.post_required_default_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_required_default_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**RequiredDefaultValidation**](RequiredDefaultValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_required_validation_request_body** -> post_required_validation_request_body(required_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.required_validation import RequiredValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredValidation(None) - try: - api_response = api_instance.post_required_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_required_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**RequiredValidation**](RequiredValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_required_with_empty_array_request_body** -> post_required_with_empty_array_request_body(required_with_empty_array) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredWithEmptyArray(None) - try: - api_response = api_instance.post_required_with_empty_array_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_required_with_empty_array_request_body: %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 -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 -------------- | ------------- | ------------- -[**RequiredWithEmptyArray**](RequiredWithEmptyArray.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_simple_enum_validation_request_body** -> post_simple_enum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = SimpleEnumValidation(1) - try: - api_response = api_instance.post_simple_enum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_simple_enum_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**SimpleEnumValidation**](SimpleEnumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_string_type_matches_strings_request_body** -> post_string_type_matches_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = "body_example" - try: - api_response = api_instance.post_string_type_matches_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_string_type_matches_strings_request_body: %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 -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 -------------- | ------------- | ------------- -**str** | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body** -> post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(the_default_keyword_does_not_do_anything_if_the_property_is_missing) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( - alpha=5, - ) - try: - api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %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 -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 -------------- | ------------- | ------------- -[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_uniqueitems_false_validation_request_body** -> post_uniqueitems_false_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsFalseValidation(None) - try: - api_response = api_instance.post_uniqueitems_false_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_uniqueitems_false_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**UniqueitemsFalseValidation**](UniqueitemsFalseValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_uniqueitems_validation_request_body** -> post_uniqueitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsValidation(None) - try: - api_response = api_instance.post_uniqueitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_uniqueitems_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**UniqueitemsValidation**](UniqueitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_uri_format_request_body** -> post_uri_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_uri_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_uri_reference_format_request_body** -> post_uri_reference_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_reference_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_uri_reference_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_uri_template_format_request_body** -> post_uri_template_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = json_api.JsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_template_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling JsonApi->post_uri_template_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/RequestBodyApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/OperationRequestBodyApi.md similarity index 86% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/RequestBodyApi.md rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/OperationRequestBodyApi.md index b62f342c75b..89a464eacb0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/RequestBodyApi.md +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/OperationRequestBodyApi.md @@ -1,93 +1,93 @@ -# unit_test_api.RequestBodyApi +# unit_test_api.OperationRequestBodyApi All URIs are relative to *https://someserver.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](RequestBodyApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -[**post_additionalproperties_are_allowed_by_default_request_body**](RequestBodyApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -[**post_additionalproperties_can_exist_by_itself_request_body**](RequestBodyApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -[**post_additionalproperties_should_not_look_in_applicators_request_body**](RequestBodyApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -[**post_allof_combined_with_anyof_oneof_request_body**](RequestBodyApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -[**post_allof_request_body**](RequestBodyApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | -[**post_allof_simple_types_request_body**](RequestBodyApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | -[**post_allof_with_base_schema_request_body**](RequestBodyApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | -[**post_allof_with_one_empty_schema_request_body**](RequestBodyApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | -[**post_allof_with_the_first_empty_schema_request_body**](RequestBodyApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -[**post_allof_with_the_last_empty_schema_request_body**](RequestBodyApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -[**post_allof_with_two_empty_schemas_request_body**](RequestBodyApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -[**post_anyof_complex_types_request_body**](RequestBodyApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | -[**post_anyof_request_body**](RequestBodyApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | -[**post_anyof_with_base_schema_request_body**](RequestBodyApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | -[**post_anyof_with_one_empty_schema_request_body**](RequestBodyApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -[**post_array_type_matches_arrays_request_body**](RequestBodyApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | -[**post_boolean_type_matches_booleans_request_body**](RequestBodyApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -[**post_by_int_request_body**](RequestBodyApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | -[**post_by_number_request_body**](RequestBodyApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | -[**post_by_small_number_request_body**](RequestBodyApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | -[**post_date_time_format_request_body**](RequestBodyApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | -[**post_email_format_request_body**](RequestBodyApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | -[**post_enum_with0_does_not_match_false_request_body**](RequestBodyApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -[**post_enum_with1_does_not_match_true_request_body**](RequestBodyApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -[**post_enum_with_escaped_characters_request_body**](RequestBodyApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | -[**post_enum_with_false_does_not_match0_request_body**](RequestBodyApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -[**post_enum_with_true_does_not_match1_request_body**](RequestBodyApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -[**post_enums_in_properties_request_body**](RequestBodyApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | -[**post_forbidden_property_request_body**](RequestBodyApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | -[**post_hostname_format_request_body**](RequestBodyApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | -[**post_integer_type_matches_integers_request_body**](RequestBodyApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -[**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](RequestBodyApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -[**post_invalid_string_value_for_default_request_body**](RequestBodyApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | -[**post_ipv4_format_request_body**](RequestBodyApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | -[**post_ipv6_format_request_body**](RequestBodyApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | -[**post_json_pointer_format_request_body**](RequestBodyApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | -[**post_maximum_validation_request_body**](RequestBodyApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | -[**post_maximum_validation_with_unsigned_integer_request_body**](RequestBodyApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -[**post_maxitems_validation_request_body**](RequestBodyApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | -[**post_maxlength_validation_request_body**](RequestBodyApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | -[**post_maxproperties0_means_the_object_is_empty_request_body**](RequestBodyApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -[**post_maxproperties_validation_request_body**](RequestBodyApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | -[**post_minimum_validation_request_body**](RequestBodyApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | -[**post_minimum_validation_with_signed_integer_request_body**](RequestBodyApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -[**post_minitems_validation_request_body**](RequestBodyApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | -[**post_minlength_validation_request_body**](RequestBodyApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | -[**post_minproperties_validation_request_body**](RequestBodyApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | -[**post_nested_allof_to_check_validation_semantics_request_body**](RequestBodyApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -[**post_nested_anyof_to_check_validation_semantics_request_body**](RequestBodyApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -[**post_nested_items_request_body**](RequestBodyApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | -[**post_nested_oneof_to_check_validation_semantics_request_body**](RequestBodyApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -[**post_not_more_complex_schema_request_body**](RequestBodyApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | -[**post_not_request_body**](RequestBodyApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | -[**post_nul_characters_in_strings_request_body**](RequestBodyApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | -[**post_null_type_matches_only_the_null_object_request_body**](RequestBodyApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -[**post_number_type_matches_numbers_request_body**](RequestBodyApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | -[**post_object_properties_validation_request_body**](RequestBodyApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | -[**post_object_type_matches_objects_request_body**](RequestBodyApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | -[**post_oneof_complex_types_request_body**](RequestBodyApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | -[**post_oneof_request_body**](RequestBodyApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | -[**post_oneof_with_base_schema_request_body**](RequestBodyApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | -[**post_oneof_with_empty_schema_request_body**](RequestBodyApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | -[**post_pattern_is_not_anchored_request_body**](RequestBodyApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | -[**post_pattern_validation_request_body**](RequestBodyApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | -[**post_properties_with_escaped_characters_request_body**](RequestBodyApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -[**post_property_named_ref_that_is_not_a_reference_request_body**](RequestBodyApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -[**post_ref_in_additionalproperties_request_body**](RequestBodyApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | -[**post_ref_in_allof_request_body**](RequestBodyApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | -[**post_ref_in_anyof_request_body**](RequestBodyApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | -[**post_ref_in_items_request_body**](RequestBodyApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | -[**post_ref_in_oneof_request_body**](RequestBodyApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | -[**post_ref_in_property_request_body**](RequestBodyApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | -[**post_required_default_validation_request_body**](RequestBodyApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | -[**post_required_validation_request_body**](RequestBodyApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | -[**post_required_with_empty_array_request_body**](RequestBodyApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | -[**post_simple_enum_validation_request_body**](RequestBodyApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | -[**post_string_type_matches_strings_request_body**](RequestBodyApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | -[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](RequestBodyApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -[**post_uniqueitems_false_validation_request_body**](RequestBodyApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | -[**post_uniqueitems_validation_request_body**](RequestBodyApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | -[**post_uri_format_request_body**](RequestBodyApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | -[**post_uri_reference_format_request_body**](RequestBodyApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | -[**post_uri_template_format_request_body**](RequestBodyApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | +[**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](OperationRequestBodyApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | +[**post_additionalproperties_are_allowed_by_default_request_body**](OperationRequestBodyApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | +[**post_additionalproperties_can_exist_by_itself_request_body**](OperationRequestBodyApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | +[**post_additionalproperties_should_not_look_in_applicators_request_body**](OperationRequestBodyApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | +[**post_allof_combined_with_anyof_oneof_request_body**](OperationRequestBodyApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | +[**post_allof_request_body**](OperationRequestBodyApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | +[**post_allof_simple_types_request_body**](OperationRequestBodyApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | +[**post_allof_with_base_schema_request_body**](OperationRequestBodyApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | +[**post_allof_with_one_empty_schema_request_body**](OperationRequestBodyApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | +[**post_allof_with_the_first_empty_schema_request_body**](OperationRequestBodyApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | +[**post_allof_with_the_last_empty_schema_request_body**](OperationRequestBodyApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | +[**post_allof_with_two_empty_schemas_request_body**](OperationRequestBodyApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | +[**post_anyof_complex_types_request_body**](OperationRequestBodyApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | +[**post_anyof_request_body**](OperationRequestBodyApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | +[**post_anyof_with_base_schema_request_body**](OperationRequestBodyApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | +[**post_anyof_with_one_empty_schema_request_body**](OperationRequestBodyApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | +[**post_array_type_matches_arrays_request_body**](OperationRequestBodyApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | +[**post_boolean_type_matches_booleans_request_body**](OperationRequestBodyApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | +[**post_by_int_request_body**](OperationRequestBodyApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | +[**post_by_number_request_body**](OperationRequestBodyApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | +[**post_by_small_number_request_body**](OperationRequestBodyApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | +[**post_date_time_format_request_body**](OperationRequestBodyApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | +[**post_email_format_request_body**](OperationRequestBodyApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | +[**post_enum_with0_does_not_match_false_request_body**](OperationRequestBodyApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | +[**post_enum_with1_does_not_match_true_request_body**](OperationRequestBodyApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | +[**post_enum_with_escaped_characters_request_body**](OperationRequestBodyApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | +[**post_enum_with_false_does_not_match0_request_body**](OperationRequestBodyApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | +[**post_enum_with_true_does_not_match1_request_body**](OperationRequestBodyApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | +[**post_enums_in_properties_request_body**](OperationRequestBodyApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | +[**post_forbidden_property_request_body**](OperationRequestBodyApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | +[**post_hostname_format_request_body**](OperationRequestBodyApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | +[**post_integer_type_matches_integers_request_body**](OperationRequestBodyApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | +[**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](OperationRequestBodyApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | +[**post_invalid_string_value_for_default_request_body**](OperationRequestBodyApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | +[**post_ipv4_format_request_body**](OperationRequestBodyApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | +[**post_ipv6_format_request_body**](OperationRequestBodyApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | +[**post_json_pointer_format_request_body**](OperationRequestBodyApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | +[**post_maximum_validation_request_body**](OperationRequestBodyApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | +[**post_maximum_validation_with_unsigned_integer_request_body**](OperationRequestBodyApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | +[**post_maxitems_validation_request_body**](OperationRequestBodyApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | +[**post_maxlength_validation_request_body**](OperationRequestBodyApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | +[**post_maxproperties0_means_the_object_is_empty_request_body**](OperationRequestBodyApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | +[**post_maxproperties_validation_request_body**](OperationRequestBodyApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | +[**post_minimum_validation_request_body**](OperationRequestBodyApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | +[**post_minimum_validation_with_signed_integer_request_body**](OperationRequestBodyApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | +[**post_minitems_validation_request_body**](OperationRequestBodyApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | +[**post_minlength_validation_request_body**](OperationRequestBodyApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | +[**post_minproperties_validation_request_body**](OperationRequestBodyApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | +[**post_nested_allof_to_check_validation_semantics_request_body**](OperationRequestBodyApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | +[**post_nested_anyof_to_check_validation_semantics_request_body**](OperationRequestBodyApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | +[**post_nested_items_request_body**](OperationRequestBodyApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | +[**post_nested_oneof_to_check_validation_semantics_request_body**](OperationRequestBodyApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | +[**post_not_more_complex_schema_request_body**](OperationRequestBodyApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | +[**post_not_request_body**](OperationRequestBodyApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | +[**post_nul_characters_in_strings_request_body**](OperationRequestBodyApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | +[**post_null_type_matches_only_the_null_object_request_body**](OperationRequestBodyApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | +[**post_number_type_matches_numbers_request_body**](OperationRequestBodyApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | +[**post_object_properties_validation_request_body**](OperationRequestBodyApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | +[**post_object_type_matches_objects_request_body**](OperationRequestBodyApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | +[**post_oneof_complex_types_request_body**](OperationRequestBodyApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | +[**post_oneof_request_body**](OperationRequestBodyApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | +[**post_oneof_with_base_schema_request_body**](OperationRequestBodyApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | +[**post_oneof_with_empty_schema_request_body**](OperationRequestBodyApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | +[**post_pattern_is_not_anchored_request_body**](OperationRequestBodyApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | +[**post_pattern_validation_request_body**](OperationRequestBodyApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | +[**post_properties_with_escaped_characters_request_body**](OperationRequestBodyApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | +[**post_property_named_ref_that_is_not_a_reference_request_body**](OperationRequestBodyApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | +[**post_ref_in_additionalproperties_request_body**](OperationRequestBodyApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | +[**post_ref_in_allof_request_body**](OperationRequestBodyApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | +[**post_ref_in_anyof_request_body**](OperationRequestBodyApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | +[**post_ref_in_items_request_body**](OperationRequestBodyApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | +[**post_ref_in_oneof_request_body**](OperationRequestBodyApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | +[**post_ref_in_property_request_body**](OperationRequestBodyApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | +[**post_required_default_validation_request_body**](OperationRequestBodyApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | +[**post_required_validation_request_body**](OperationRequestBodyApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | +[**post_required_with_empty_array_request_body**](OperationRequestBodyApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | +[**post_simple_enum_validation_request_body**](OperationRequestBodyApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | +[**post_string_type_matches_strings_request_body**](OperationRequestBodyApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | +[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](OperationRequestBodyApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | +[**post_uniqueitems_false_validation_request_body**](OperationRequestBodyApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | +[**post_uniqueitems_validation_request_body**](OperationRequestBodyApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | +[**post_uri_format_request_body**](OperationRequestBodyApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | +[**post_uri_reference_format_request_body**](OperationRequestBodyApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | +[**post_uri_template_format_request_body**](OperationRequestBodyApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | # **post_additionalproperties_allows_a_schema_which_should_validate_request_body** > post_additionalproperties_allows_a_schema_which_should_validate_request_body(additionalproperties_allows_a_schema_which_should_validate) @@ -98,7 +98,7 @@ Method | HTTP request | Description ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -110,7 +110,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AdditionalpropertiesAllowsASchemaWhichShouldValidate( @@ -122,7 +122,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %s\n" % e) ``` ### Parameters @@ -174,7 +174,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -186,7 +186,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AdditionalpropertiesAreAllowedByDefault(None) @@ -195,7 +195,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_additionalproperties_are_allowed_by_default_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_additionalproperties_are_allowed_by_default_request_body: %s\n" % e) ``` ### Parameters @@ -247,7 +247,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -259,7 +259,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AdditionalpropertiesCanExistByItself( @@ -270,7 +270,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_additionalproperties_can_exist_by_itself_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_additionalproperties_can_exist_by_itself_request_body: %s\n" % e) ``` ### Parameters @@ -322,7 +322,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -334,7 +334,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AdditionalpropertiesShouldNotLookInApplicators(None) @@ -343,7 +343,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_additionalproperties_should_not_look_in_applicators_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_additionalproperties_should_not_look_in_applicators_request_body: %s\n" % e) ``` ### Parameters @@ -395,7 +395,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -407,7 +407,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AllofCombinedWithAnyofOneof(None) @@ -416,7 +416,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_allof_combined_with_anyof_oneof_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_allof_combined_with_anyof_oneof_request_body: %s\n" % e) ``` ### Parameters @@ -468,7 +468,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.allof import Allof from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -480,7 +480,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = Allof(None) @@ -489,7 +489,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_allof_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_allof_request_body: %s\n" % e) ``` ### Parameters @@ -541,7 +541,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.allof_simple_types import AllofSimpleTypes from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -553,7 +553,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AllofSimpleTypes(None) @@ -562,7 +562,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_allof_simple_types_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_allof_simple_types_request_body: %s\n" % e) ``` ### Parameters @@ -614,7 +614,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -626,7 +626,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AllofWithBaseSchema({}) @@ -635,7 +635,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_allof_with_base_schema_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_allof_with_base_schema_request_body: %s\n" % e) ``` ### Parameters @@ -687,7 +687,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -699,7 +699,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AllofWithOneEmptySchema(None) @@ -708,7 +708,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_allof_with_one_empty_schema_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_allof_with_one_empty_schema_request_body: %s\n" % e) ``` ### Parameters @@ -760,7 +760,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -772,7 +772,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AllofWithTheFirstEmptySchema(None) @@ -781,7 +781,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_allof_with_the_first_empty_schema_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_allof_with_the_first_empty_schema_request_body: %s\n" % e) ``` ### Parameters @@ -833,7 +833,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -845,7 +845,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AllofWithTheLastEmptySchema(None) @@ -854,7 +854,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_allof_with_the_last_empty_schema_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_allof_with_the_last_empty_schema_request_body: %s\n" % e) ``` ### Parameters @@ -906,7 +906,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -918,7 +918,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AllofWithTwoEmptySchemas(None) @@ -927,7 +927,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_allof_with_two_empty_schemas_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_allof_with_two_empty_schemas_request_body: %s\n" % e) ``` ### Parameters @@ -979,7 +979,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.anyof_complex_types import AnyofComplexTypes from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -991,7 +991,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AnyofComplexTypes(None) @@ -1000,7 +1000,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_anyof_complex_types_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_anyof_complex_types_request_body: %s\n" % e) ``` ### Parameters @@ -1052,7 +1052,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.anyof import Anyof from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -1064,7 +1064,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = Anyof(None) @@ -1073,7 +1073,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_anyof_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_anyof_request_body: %s\n" % e) ``` ### Parameters @@ -1125,7 +1125,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -1137,7 +1137,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AnyofWithBaseSchema("body_example") @@ -1146,7 +1146,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_anyof_with_base_schema_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_anyof_with_base_schema_request_body: %s\n" % e) ``` ### Parameters @@ -1198,7 +1198,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -1210,7 +1210,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = AnyofWithOneEmptySchema(None) @@ -1219,7 +1219,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_anyof_with_one_empty_schema_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_anyof_with_one_empty_schema_request_body: %s\n" % e) ``` ### Parameters @@ -1271,7 +1271,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -1283,7 +1283,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = ArrayTypeMatchesArrays([ @@ -1294,7 +1294,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_array_type_matches_arrays_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_array_type_matches_arrays_request_body: %s\n" % e) ``` ### Parameters @@ -1346,7 +1346,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -1357,7 +1357,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = True @@ -1366,7 +1366,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_boolean_type_matches_booleans_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_boolean_type_matches_booleans_request_body: %s\n" % e) ``` ### Parameters @@ -1418,7 +1418,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.by_int import ByInt from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -1430,7 +1430,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = ByInt(None) @@ -1439,7 +1439,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_by_int_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_by_int_request_body: %s\n" % e) ``` ### Parameters @@ -1491,7 +1491,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.by_number import ByNumber from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -1503,7 +1503,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = ByNumber(None) @@ -1512,7 +1512,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_by_number_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_by_number_request_body: %s\n" % e) ``` ### Parameters @@ -1564,7 +1564,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.by_small_number import BySmallNumber from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -1576,7 +1576,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = BySmallNumber(None) @@ -1585,7 +1585,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_by_small_number_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_by_small_number_request_body: %s\n" % e) ``` ### Parameters @@ -1637,7 +1637,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -1648,7 +1648,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -1657,7 +1657,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_date_time_format_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_date_time_format_request_body: %s\n" % e) ``` ### Parameters @@ -1710,7 +1710,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -1721,7 +1721,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -1730,7 +1730,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_email_format_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_email_format_request_body: %s\n" % e) ``` ### Parameters @@ -1783,7 +1783,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -1795,7 +1795,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = EnumWith0DoesNotMatchFalse(0) @@ -1804,7 +1804,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_enum_with0_does_not_match_false_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_enum_with0_does_not_match_false_request_body: %s\n" % e) ``` ### Parameters @@ -1856,7 +1856,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -1868,7 +1868,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = EnumWith1DoesNotMatchTrue(1) @@ -1877,7 +1877,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_enum_with1_does_not_match_true_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_enum_with1_does_not_match_true_request_body: %s\n" % e) ``` ### Parameters @@ -1929,7 +1929,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -1941,7 +1941,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = EnumWithEscapedCharacters("foo @@ -1951,7 +1951,7 @@ bar") body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_enum_with_escaped_characters_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_enum_with_escaped_characters_request_body: %s\n" % e) ``` ### Parameters @@ -2003,7 +2003,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -2015,7 +2015,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = EnumWithFalseDoesNotMatch0(False) @@ -2024,7 +2024,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_enum_with_false_does_not_match0_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_enum_with_false_does_not_match0_request_body: %s\n" % e) ``` ### Parameters @@ -2076,7 +2076,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -2088,7 +2088,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = EnumWithTrueDoesNotMatch1(True) @@ -2097,7 +2097,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_enum_with_true_does_not_match1_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_enum_with_true_does_not_match1_request_body: %s\n" % e) ``` ### Parameters @@ -2149,7 +2149,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.enums_in_properties import EnumsInProperties from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -2161,7 +2161,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = EnumsInProperties( @@ -2173,7 +2173,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_enums_in_properties_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_enums_in_properties_request_body: %s\n" % e) ``` ### Parameters @@ -2225,7 +2225,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.forbidden_property import ForbiddenProperty from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -2237,7 +2237,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = ForbiddenProperty(None) @@ -2246,7 +2246,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_forbidden_property_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_forbidden_property_request_body: %s\n" % e) ``` ### Parameters @@ -2298,7 +2298,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2309,7 +2309,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -2318,7 +2318,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_hostname_format_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_hostname_format_request_body: %s\n" % e) ``` ### Parameters @@ -2371,7 +2371,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2382,7 +2382,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = 1 @@ -2391,7 +2391,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_integer_type_matches_integers_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_integer_type_matches_integers_request_body: %s\n" % e) ``` ### Parameters @@ -2443,7 +2443,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -2455,7 +2455,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(1) @@ -2464,7 +2464,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %s\n" % e) ``` ### Parameters @@ -2516,7 +2516,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -2528,7 +2528,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = InvalidStringValueForDefault(None) @@ -2537,7 +2537,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_invalid_string_value_for_default_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_invalid_string_value_for_default_request_body: %s\n" % e) ``` ### Parameters @@ -2589,7 +2589,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2600,7 +2600,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -2609,7 +2609,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_ipv4_format_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_ipv4_format_request_body: %s\n" % e) ``` ### Parameters @@ -2662,7 +2662,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2673,7 +2673,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -2682,7 +2682,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_ipv6_format_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_ipv6_format_request_body: %s\n" % e) ``` ### Parameters @@ -2735,7 +2735,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -2746,7 +2746,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -2755,7 +2755,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_json_pointer_format_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_json_pointer_format_request_body: %s\n" % e) ``` ### Parameters @@ -2808,7 +2808,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.maximum_validation import MaximumValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -2820,7 +2820,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = MaximumValidation(None) @@ -2829,7 +2829,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_maximum_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_maximum_validation_request_body: %s\n" % e) ``` ### Parameters @@ -2881,7 +2881,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -2893,7 +2893,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = MaximumValidationWithUnsignedInteger(None) @@ -2902,7 +2902,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_maximum_validation_with_unsigned_integer_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_maximum_validation_with_unsigned_integer_request_body: %s\n" % e) ``` ### Parameters @@ -2954,7 +2954,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.maxitems_validation import MaxitemsValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -2966,7 +2966,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = MaxitemsValidation(None) @@ -2975,7 +2975,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_maxitems_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_maxitems_validation_request_body: %s\n" % e) ``` ### Parameters @@ -3027,7 +3027,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.maxlength_validation import MaxlengthValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3039,7 +3039,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = MaxlengthValidation(None) @@ -3048,7 +3048,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_maxlength_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_maxlength_validation_request_body: %s\n" % e) ``` ### Parameters @@ -3100,7 +3100,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3112,7 +3112,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = Maxproperties0MeansTheObjectIsEmpty(None) @@ -3121,7 +3121,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_maxproperties0_means_the_object_is_empty_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_maxproperties0_means_the_object_is_empty_request_body: %s\n" % e) ``` ### Parameters @@ -3173,7 +3173,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3185,7 +3185,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = MaxpropertiesValidation(None) @@ -3194,7 +3194,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_maxproperties_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_maxproperties_validation_request_body: %s\n" % e) ``` ### Parameters @@ -3246,7 +3246,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.minimum_validation import MinimumValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3258,7 +3258,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = MinimumValidation(None) @@ -3267,7 +3267,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_minimum_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_minimum_validation_request_body: %s\n" % e) ``` ### Parameters @@ -3319,7 +3319,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3331,7 +3331,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = MinimumValidationWithSignedInteger(None) @@ -3340,7 +3340,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_minimum_validation_with_signed_integer_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_minimum_validation_with_signed_integer_request_body: %s\n" % e) ``` ### Parameters @@ -3392,7 +3392,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.minitems_validation import MinitemsValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3404,7 +3404,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = MinitemsValidation(None) @@ -3413,7 +3413,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_minitems_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_minitems_validation_request_body: %s\n" % e) ``` ### Parameters @@ -3465,7 +3465,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.minlength_validation import MinlengthValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3477,7 +3477,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = MinlengthValidation(None) @@ -3486,7 +3486,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_minlength_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_minlength_validation_request_body: %s\n" % e) ``` ### Parameters @@ -3538,7 +3538,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.minproperties_validation import MinpropertiesValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3550,7 +3550,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = MinpropertiesValidation(None) @@ -3559,7 +3559,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_minproperties_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_minproperties_validation_request_body: %s\n" % e) ``` ### Parameters @@ -3611,7 +3611,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3623,7 +3623,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = NestedAllofToCheckValidationSemantics(None) @@ -3632,7 +3632,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_nested_allof_to_check_validation_semantics_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_nested_allof_to_check_validation_semantics_request_body: %s\n" % e) ``` ### Parameters @@ -3684,7 +3684,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3696,7 +3696,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = NestedAnyofToCheckValidationSemantics(None) @@ -3705,7 +3705,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_nested_anyof_to_check_validation_semantics_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_nested_anyof_to_check_validation_semantics_request_body: %s\n" % e) ``` ### Parameters @@ -3757,7 +3757,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.nested_items import NestedItems from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3769,7 +3769,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = NestedItems([ @@ -3786,7 +3786,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_nested_items_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_nested_items_request_body: %s\n" % e) ``` ### Parameters @@ -3838,7 +3838,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -3850,7 +3850,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = NestedOneofToCheckValidationSemantics(None) @@ -3859,7 +3859,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_nested_oneof_to_check_validation_semantics_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_nested_oneof_to_check_validation_semantics_request_body: %s\n" % e) ``` ### Parameters @@ -3911,7 +3911,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -3922,7 +3922,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -3931,7 +3931,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_not_more_complex_schema_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_not_more_complex_schema_request_body: %s\n" % e) ``` ### Parameters @@ -3984,7 +3984,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -3995,7 +3995,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -4004,7 +4004,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_not_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_not_request_body: %s\n" % e) ``` ### Parameters @@ -4057,7 +4057,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -4069,7 +4069,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = NulCharactersInStrings("hellothere") @@ -4078,7 +4078,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_nul_characters_in_strings_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_nul_characters_in_strings_request_body: %s\n" % e) ``` ### Parameters @@ -4130,7 +4130,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4141,7 +4141,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -4150,7 +4150,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_null_type_matches_only_the_null_object_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_null_type_matches_only_the_null_object_request_body: %s\n" % e) ``` ### Parameters @@ -4202,7 +4202,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4213,7 +4213,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = 3.14 @@ -4222,7 +4222,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_number_type_matches_numbers_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_number_type_matches_numbers_request_body: %s\n" % e) ``` ### Parameters @@ -4274,7 +4274,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -4286,7 +4286,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = ObjectPropertiesValidation(None) @@ -4295,7 +4295,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_object_properties_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_object_properties_validation_request_body: %s\n" % e) ``` ### Parameters @@ -4347,7 +4347,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -4358,7 +4358,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = dict() @@ -4367,7 +4367,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_object_type_matches_objects_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_object_type_matches_objects_request_body: %s\n" % e) ``` ### Parameters @@ -4420,7 +4420,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.oneof_complex_types import OneofComplexTypes from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -4432,7 +4432,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = OneofComplexTypes(None) @@ -4441,7 +4441,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_oneof_complex_types_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_oneof_complex_types_request_body: %s\n" % e) ``` ### Parameters @@ -4493,7 +4493,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.oneof import Oneof from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -4505,7 +4505,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = Oneof(None) @@ -4514,7 +4514,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_oneof_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_oneof_request_body: %s\n" % e) ``` ### Parameters @@ -4566,7 +4566,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -4578,7 +4578,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = OneofWithBaseSchema("body_example") @@ -4587,7 +4587,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_oneof_with_base_schema_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_oneof_with_base_schema_request_body: %s\n" % e) ``` ### Parameters @@ -4639,7 +4639,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -4651,7 +4651,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = OneofWithEmptySchema(None) @@ -4660,7 +4660,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_oneof_with_empty_schema_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_oneof_with_empty_schema_request_body: %s\n" % e) ``` ### Parameters @@ -4712,7 +4712,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -4724,7 +4724,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = PatternIsNotAnchored(None) @@ -4733,7 +4733,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_pattern_is_not_anchored_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_pattern_is_not_anchored_request_body: %s\n" % e) ``` ### Parameters @@ -4785,7 +4785,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.pattern_validation import PatternValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -4797,7 +4797,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = PatternValidation(None) @@ -4806,7 +4806,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_pattern_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_pattern_validation_request_body: %s\n" % e) ``` ### Parameters @@ -4858,7 +4858,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -4870,7 +4870,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = PropertiesWithEscapedCharacters(None) @@ -4879,7 +4879,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_properties_with_escaped_characters_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_properties_with_escaped_characters_request_body: %s\n" % e) ``` ### Parameters @@ -4931,7 +4931,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -4943,7 +4943,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = PropertyNamedRefThatIsNotAReference(None) @@ -4952,7 +4952,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) ``` ### Parameters @@ -5004,7 +5004,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5016,7 +5016,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = RefInAdditionalproperties( @@ -5027,7 +5027,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_ref_in_additionalproperties_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_ref_in_additionalproperties_request_body: %s\n" % e) ``` ### Parameters @@ -5079,7 +5079,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.ref_in_allof import RefInAllof from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5091,7 +5091,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = RefInAllof(None) @@ -5100,7 +5100,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_ref_in_allof_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_ref_in_allof_request_body: %s\n" % e) ``` ### Parameters @@ -5152,7 +5152,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.ref_in_anyof import RefInAnyof from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5164,7 +5164,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = RefInAnyof(None) @@ -5173,7 +5173,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_ref_in_anyof_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_ref_in_anyof_request_body: %s\n" % e) ``` ### Parameters @@ -5225,7 +5225,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.ref_in_items import RefInItems from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5237,7 +5237,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = RefInItems([ @@ -5248,7 +5248,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_ref_in_items_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_ref_in_items_request_body: %s\n" % e) ``` ### Parameters @@ -5300,7 +5300,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.ref_in_oneof import RefInOneof from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5312,7 +5312,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = RefInOneof(None) @@ -5321,7 +5321,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_ref_in_oneof_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_ref_in_oneof_request_body: %s\n" % e) ``` ### Parameters @@ -5373,7 +5373,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.ref_in_property import RefInProperty from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5385,7 +5385,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = RefInProperty(None) @@ -5394,7 +5394,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_ref_in_property_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_ref_in_property_request_body: %s\n" % e) ``` ### Parameters @@ -5446,7 +5446,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.required_default_validation import RequiredDefaultValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5458,7 +5458,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = RequiredDefaultValidation(None) @@ -5467,7 +5467,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_required_default_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_required_default_validation_request_body: %s\n" % e) ``` ### Parameters @@ -5519,7 +5519,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.required_validation import RequiredValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5531,7 +5531,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = RequiredValidation(None) @@ -5540,7 +5540,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_required_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_required_validation_request_body: %s\n" % e) ``` ### Parameters @@ -5592,7 +5592,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5604,7 +5604,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = RequiredWithEmptyArray(None) @@ -5613,7 +5613,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_required_with_empty_array_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_required_with_empty_array_request_body: %s\n" % e) ``` ### Parameters @@ -5665,7 +5665,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.simple_enum_validation import SimpleEnumValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5677,7 +5677,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = SimpleEnumValidation(1) @@ -5686,7 +5686,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_simple_enum_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_simple_enum_validation_request_body: %s\n" % e) ``` ### Parameters @@ -5738,7 +5738,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -5749,7 +5749,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = "body_example" @@ -5758,7 +5758,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_string_type_matches_strings_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_string_type_matches_strings_request_body: %s\n" % e) ``` ### Parameters @@ -5810,7 +5810,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5822,7 +5822,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( @@ -5833,7 +5833,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %s\n" % e) ``` ### Parameters @@ -5885,7 +5885,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5897,7 +5897,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = UniqueitemsFalseValidation(None) @@ -5906,7 +5906,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_uniqueitems_false_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_uniqueitems_false_validation_request_body: %s\n" % e) ``` ### Parameters @@ -5958,7 +5958,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 @@ -5970,7 +5970,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = UniqueitemsValidation(None) @@ -5979,7 +5979,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_uniqueitems_validation_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_uniqueitems_validation_request_body: %s\n" % e) ``` ### Parameters @@ -6031,7 +6031,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -6042,7 +6042,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -6051,7 +6051,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_uri_format_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_uri_format_request_body: %s\n" % e) ``` ### Parameters @@ -6104,7 +6104,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -6115,7 +6115,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -6124,7 +6124,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_uri_reference_format_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_uri_reference_format_request_body: %s\n" % e) ``` ### Parameters @@ -6177,7 +6177,7 @@ No authorization required ```python import unit_test_api -from unit_test_api.api import request_body_api +from unit_test_api.api import operation_request_body_api from pprint import pprint # Defining the host is optional and defaults to https://someserver.com/v1 # See configuration.py for a list of all supported configuration parameters. @@ -6188,7 +6188,7 @@ configuration = unit_test_api.Configuration( # Enter a context with an instance of the API client with unit_test_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = request_body_api.RequestBodyApi(api_client) + api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set body = None @@ -6197,7 +6197,7 @@ with unit_test_api.ApiClient(configuration) as api_client: body=body, ) except unit_test_api.ApiException as e: - print("Exception when calling RequestBodyApi->post_uri_template_format_request_body: %s\n" % e) + print("Exception when calling OperationRequestBodyApi->post_uri_template_format_request_body: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/PathPostApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/PathPostApi.md new file mode 100644 index 00000000000..f664a8430d2 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/PathPostApi.md @@ -0,0 +1,11530 @@ +# unit_test_api.PathPostApi + +All URIs are relative to *https://someserver.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](PathPostApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | +[**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](PathPostApi.md#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | +[**post_additionalproperties_are_allowed_by_default_request_body**](PathPostApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | +[**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](PathPostApi.md#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | +[**post_additionalproperties_can_exist_by_itself_request_body**](PathPostApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | +[**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](PathPostApi.md#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | +[**post_additionalproperties_should_not_look_in_applicators_request_body**](PathPostApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | +[**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](PathPostApi.md#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | +[**post_allof_combined_with_anyof_oneof_request_body**](PathPostApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | +[**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](PathPostApi.md#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **POST** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | +[**post_allof_request_body**](PathPostApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | +[**post_allof_response_body_for_content_types**](PathPostApi.md#post_allof_response_body_for_content_types) | **POST** /responseBody/postAllofResponseBodyForContentTypes | +[**post_allof_simple_types_request_body**](PathPostApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | +[**post_allof_simple_types_response_body_for_content_types**](PathPostApi.md#post_allof_simple_types_response_body_for_content_types) | **POST** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | +[**post_allof_with_base_schema_request_body**](PathPostApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | +[**post_allof_with_base_schema_response_body_for_content_types**](PathPostApi.md#post_allof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | +[**post_allof_with_one_empty_schema_request_body**](PathPostApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | +[**post_allof_with_one_empty_schema_response_body_for_content_types**](PathPostApi.md#post_allof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | +[**post_allof_with_the_first_empty_schema_request_body**](PathPostApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | +[**post_allof_with_the_first_empty_schema_response_body_for_content_types**](PathPostApi.md#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | +[**post_allof_with_the_last_empty_schema_request_body**](PathPostApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | +[**post_allof_with_the_last_empty_schema_response_body_for_content_types**](PathPostApi.md#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | +[**post_allof_with_two_empty_schemas_request_body**](PathPostApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | +[**post_allof_with_two_empty_schemas_response_body_for_content_types**](PathPostApi.md#post_allof_with_two_empty_schemas_response_body_for_content_types) | **POST** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | +[**post_anyof_complex_types_request_body**](PathPostApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | +[**post_anyof_complex_types_response_body_for_content_types**](PathPostApi.md#post_anyof_complex_types_response_body_for_content_types) | **POST** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | +[**post_anyof_request_body**](PathPostApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | +[**post_anyof_response_body_for_content_types**](PathPostApi.md#post_anyof_response_body_for_content_types) | **POST** /responseBody/postAnyofResponseBodyForContentTypes | +[**post_anyof_with_base_schema_request_body**](PathPostApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | +[**post_anyof_with_base_schema_response_body_for_content_types**](PathPostApi.md#post_anyof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | +[**post_anyof_with_one_empty_schema_request_body**](PathPostApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | +[**post_anyof_with_one_empty_schema_response_body_for_content_types**](PathPostApi.md#post_anyof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | +[**post_array_type_matches_arrays_request_body**](PathPostApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | +[**post_array_type_matches_arrays_response_body_for_content_types**](PathPostApi.md#post_array_type_matches_arrays_response_body_for_content_types) | **POST** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | +[**post_boolean_type_matches_booleans_request_body**](PathPostApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | +[**post_boolean_type_matches_booleans_response_body_for_content_types**](PathPostApi.md#post_boolean_type_matches_booleans_response_body_for_content_types) | **POST** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | +[**post_by_int_request_body**](PathPostApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | +[**post_by_int_response_body_for_content_types**](PathPostApi.md#post_by_int_response_body_for_content_types) | **POST** /responseBody/postByIntResponseBodyForContentTypes | +[**post_by_number_request_body**](PathPostApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | +[**post_by_number_response_body_for_content_types**](PathPostApi.md#post_by_number_response_body_for_content_types) | **POST** /responseBody/postByNumberResponseBodyForContentTypes | +[**post_by_small_number_request_body**](PathPostApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | +[**post_by_small_number_response_body_for_content_types**](PathPostApi.md#post_by_small_number_response_body_for_content_types) | **POST** /responseBody/postBySmallNumberResponseBodyForContentTypes | +[**post_date_time_format_request_body**](PathPostApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | +[**post_date_time_format_response_body_for_content_types**](PathPostApi.md#post_date_time_format_response_body_for_content_types) | **POST** /responseBody/postDateTimeFormatResponseBodyForContentTypes | +[**post_email_format_request_body**](PathPostApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | +[**post_email_format_response_body_for_content_types**](PathPostApi.md#post_email_format_response_body_for_content_types) | **POST** /responseBody/postEmailFormatResponseBodyForContentTypes | +[**post_enum_with0_does_not_match_false_request_body**](PathPostApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | +[**post_enum_with0_does_not_match_false_response_body_for_content_types**](PathPostApi.md#post_enum_with0_does_not_match_false_response_body_for_content_types) | **POST** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | +[**post_enum_with1_does_not_match_true_request_body**](PathPostApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | +[**post_enum_with1_does_not_match_true_response_body_for_content_types**](PathPostApi.md#post_enum_with1_does_not_match_true_response_body_for_content_types) | **POST** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | +[**post_enum_with_escaped_characters_request_body**](PathPostApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | +[**post_enum_with_escaped_characters_response_body_for_content_types**](PathPostApi.md#post_enum_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | +[**post_enum_with_false_does_not_match0_request_body**](PathPostApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | +[**post_enum_with_false_does_not_match0_response_body_for_content_types**](PathPostApi.md#post_enum_with_false_does_not_match0_response_body_for_content_types) | **POST** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | +[**post_enum_with_true_does_not_match1_request_body**](PathPostApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | +[**post_enum_with_true_does_not_match1_response_body_for_content_types**](PathPostApi.md#post_enum_with_true_does_not_match1_response_body_for_content_types) | **POST** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | +[**post_enums_in_properties_request_body**](PathPostApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | +[**post_enums_in_properties_response_body_for_content_types**](PathPostApi.md#post_enums_in_properties_response_body_for_content_types) | **POST** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | +[**post_forbidden_property_request_body**](PathPostApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | +[**post_forbidden_property_response_body_for_content_types**](PathPostApi.md#post_forbidden_property_response_body_for_content_types) | **POST** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | +[**post_hostname_format_request_body**](PathPostApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | +[**post_hostname_format_response_body_for_content_types**](PathPostApi.md#post_hostname_format_response_body_for_content_types) | **POST** /responseBody/postHostnameFormatResponseBodyForContentTypes | +[**post_integer_type_matches_integers_request_body**](PathPostApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | +[**post_integer_type_matches_integers_response_body_for_content_types**](PathPostApi.md#post_integer_type_matches_integers_response_body_for_content_types) | **POST** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | +[**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](PathPostApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | +[**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](PathPostApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **POST** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | +[**post_invalid_string_value_for_default_request_body**](PathPostApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | +[**post_invalid_string_value_for_default_response_body_for_content_types**](PathPostApi.md#post_invalid_string_value_for_default_response_body_for_content_types) | **POST** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | +[**post_ipv4_format_request_body**](PathPostApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | +[**post_ipv4_format_response_body_for_content_types**](PathPostApi.md#post_ipv4_format_response_body_for_content_types) | **POST** /responseBody/postIpv4FormatResponseBodyForContentTypes | +[**post_ipv6_format_request_body**](PathPostApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | +[**post_ipv6_format_response_body_for_content_types**](PathPostApi.md#post_ipv6_format_response_body_for_content_types) | **POST** /responseBody/postIpv6FormatResponseBodyForContentTypes | +[**post_json_pointer_format_request_body**](PathPostApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | +[**post_json_pointer_format_response_body_for_content_types**](PathPostApi.md#post_json_pointer_format_response_body_for_content_types) | **POST** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | +[**post_maximum_validation_request_body**](PathPostApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | +[**post_maximum_validation_response_body_for_content_types**](PathPostApi.md#post_maximum_validation_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationResponseBodyForContentTypes | +[**post_maximum_validation_with_unsigned_integer_request_body**](PathPostApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | +[**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](PathPostApi.md#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | +[**post_maxitems_validation_request_body**](PathPostApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | +[**post_maxitems_validation_response_body_for_content_types**](PathPostApi.md#post_maxitems_validation_response_body_for_content_types) | **POST** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | +[**post_maxlength_validation_request_body**](PathPostApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | +[**post_maxlength_validation_response_body_for_content_types**](PathPostApi.md#post_maxlength_validation_response_body_for_content_types) | **POST** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | +[**post_maxproperties0_means_the_object_is_empty_request_body**](PathPostApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | +[**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](PathPostApi.md#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **POST** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | +[**post_maxproperties_validation_request_body**](PathPostApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | +[**post_maxproperties_validation_response_body_for_content_types**](PathPostApi.md#post_maxproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | +[**post_minimum_validation_request_body**](PathPostApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | +[**post_minimum_validation_response_body_for_content_types**](PathPostApi.md#post_minimum_validation_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationResponseBodyForContentTypes | +[**post_minimum_validation_with_signed_integer_request_body**](PathPostApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | +[**post_minimum_validation_with_signed_integer_response_body_for_content_types**](PathPostApi.md#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | +[**post_minitems_validation_request_body**](PathPostApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | +[**post_minitems_validation_response_body_for_content_types**](PathPostApi.md#post_minitems_validation_response_body_for_content_types) | **POST** /responseBody/postMinitemsValidationResponseBodyForContentTypes | +[**post_minlength_validation_request_body**](PathPostApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | +[**post_minlength_validation_response_body_for_content_types**](PathPostApi.md#post_minlength_validation_response_body_for_content_types) | **POST** /responseBody/postMinlengthValidationResponseBodyForContentTypes | +[**post_minproperties_validation_request_body**](PathPostApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | +[**post_minproperties_validation_response_body_for_content_types**](PathPostApi.md#post_minproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | +[**post_nested_allof_to_check_validation_semantics_request_body**](PathPostApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | +[**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](PathPostApi.md#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | +[**post_nested_anyof_to_check_validation_semantics_request_body**](PathPostApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | +[**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](PathPostApi.md#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | +[**post_nested_items_request_body**](PathPostApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | +[**post_nested_items_response_body_for_content_types**](PathPostApi.md#post_nested_items_response_body_for_content_types) | **POST** /responseBody/postNestedItemsResponseBodyForContentTypes | +[**post_nested_oneof_to_check_validation_semantics_request_body**](PathPostApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | +[**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](PathPostApi.md#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | +[**post_not_more_complex_schema_request_body**](PathPostApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | +[**post_not_more_complex_schema_response_body_for_content_types**](PathPostApi.md#post_not_more_complex_schema_response_body_for_content_types) | **POST** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | +[**post_not_request_body**](PathPostApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | +[**post_not_response_body_for_content_types**](PathPostApi.md#post_not_response_body_for_content_types) | **POST** /responseBody/postNotResponseBodyForContentTypes | +[**post_nul_characters_in_strings_request_body**](PathPostApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | +[**post_nul_characters_in_strings_response_body_for_content_types**](PathPostApi.md#post_nul_characters_in_strings_response_body_for_content_types) | **POST** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | +[**post_null_type_matches_only_the_null_object_request_body**](PathPostApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | +[**post_null_type_matches_only_the_null_object_response_body_for_content_types**](PathPostApi.md#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **POST** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | +[**post_number_type_matches_numbers_request_body**](PathPostApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | +[**post_number_type_matches_numbers_response_body_for_content_types**](PathPostApi.md#post_number_type_matches_numbers_response_body_for_content_types) | **POST** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | +[**post_object_properties_validation_request_body**](PathPostApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | +[**post_object_properties_validation_response_body_for_content_types**](PathPostApi.md#post_object_properties_validation_response_body_for_content_types) | **POST** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | +[**post_object_type_matches_objects_request_body**](PathPostApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | +[**post_object_type_matches_objects_response_body_for_content_types**](PathPostApi.md#post_object_type_matches_objects_response_body_for_content_types) | **POST** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | +[**post_oneof_complex_types_request_body**](PathPostApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | +[**post_oneof_complex_types_response_body_for_content_types**](PathPostApi.md#post_oneof_complex_types_response_body_for_content_types) | **POST** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | +[**post_oneof_request_body**](PathPostApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | +[**post_oneof_response_body_for_content_types**](PathPostApi.md#post_oneof_response_body_for_content_types) | **POST** /responseBody/postOneofResponseBodyForContentTypes | +[**post_oneof_with_base_schema_request_body**](PathPostApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | +[**post_oneof_with_base_schema_response_body_for_content_types**](PathPostApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | +[**post_oneof_with_empty_schema_request_body**](PathPostApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | +[**post_oneof_with_empty_schema_response_body_for_content_types**](PathPostApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | +[**post_pattern_is_not_anchored_request_body**](PathPostApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | +[**post_pattern_is_not_anchored_response_body_for_content_types**](PathPostApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **POST** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | +[**post_pattern_validation_request_body**](PathPostApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | +[**post_pattern_validation_response_body_for_content_types**](PathPostApi.md#post_pattern_validation_response_body_for_content_types) | **POST** /responseBody/postPatternValidationResponseBodyForContentTypes | +[**post_properties_with_escaped_characters_request_body**](PathPostApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | +[**post_properties_with_escaped_characters_response_body_for_content_types**](PathPostApi.md#post_properties_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | +[**post_property_named_ref_that_is_not_a_reference_request_body**](PathPostApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | +[**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](PathPostApi.md#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **POST** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | +[**post_ref_in_additionalproperties_request_body**](PathPostApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | +[**post_ref_in_additionalproperties_response_body_for_content_types**](PathPostApi.md#post_ref_in_additionalproperties_response_body_for_content_types) | **POST** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | +[**post_ref_in_allof_request_body**](PathPostApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | +[**post_ref_in_allof_response_body_for_content_types**](PathPostApi.md#post_ref_in_allof_response_body_for_content_types) | **POST** /responseBody/postRefInAllofResponseBodyForContentTypes | +[**post_ref_in_anyof_request_body**](PathPostApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | +[**post_ref_in_anyof_response_body_for_content_types**](PathPostApi.md#post_ref_in_anyof_response_body_for_content_types) | **POST** /responseBody/postRefInAnyofResponseBodyForContentTypes | +[**post_ref_in_items_request_body**](PathPostApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | +[**post_ref_in_items_response_body_for_content_types**](PathPostApi.md#post_ref_in_items_response_body_for_content_types) | **POST** /responseBody/postRefInItemsResponseBodyForContentTypes | +[**post_ref_in_oneof_request_body**](PathPostApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | +[**post_ref_in_oneof_response_body_for_content_types**](PathPostApi.md#post_ref_in_oneof_response_body_for_content_types) | **POST** /responseBody/postRefInOneofResponseBodyForContentTypes | +[**post_ref_in_property_request_body**](PathPostApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | +[**post_ref_in_property_response_body_for_content_types**](PathPostApi.md#post_ref_in_property_response_body_for_content_types) | **POST** /responseBody/postRefInPropertyResponseBodyForContentTypes | +[**post_required_default_validation_request_body**](PathPostApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | +[**post_required_default_validation_response_body_for_content_types**](PathPostApi.md#post_required_default_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | +[**post_required_validation_request_body**](PathPostApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | +[**post_required_validation_response_body_for_content_types**](PathPostApi.md#post_required_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredValidationResponseBodyForContentTypes | +[**post_required_with_empty_array_request_body**](PathPostApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | +[**post_required_with_empty_array_response_body_for_content_types**](PathPostApi.md#post_required_with_empty_array_response_body_for_content_types) | **POST** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | +[**post_simple_enum_validation_request_body**](PathPostApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | +[**post_simple_enum_validation_response_body_for_content_types**](PathPostApi.md#post_simple_enum_validation_response_body_for_content_types) | **POST** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | +[**post_string_type_matches_strings_request_body**](PathPostApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | +[**post_string_type_matches_strings_response_body_for_content_types**](PathPostApi.md#post_string_type_matches_strings_response_body_for_content_types) | **POST** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | +[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](PathPostApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | +[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](PathPostApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **POST** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | +[**post_uniqueitems_false_validation_request_body**](PathPostApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | +[**post_uniqueitems_false_validation_response_body_for_content_types**](PathPostApi.md#post_uniqueitems_false_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | +[**post_uniqueitems_validation_request_body**](PathPostApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | +[**post_uniqueitems_validation_response_body_for_content_types**](PathPostApi.md#post_uniqueitems_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | +[**post_uri_format_request_body**](PathPostApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | +[**post_uri_format_response_body_for_content_types**](PathPostApi.md#post_uri_format_response_body_for_content_types) | **POST** /responseBody/postUriFormatResponseBodyForContentTypes | +[**post_uri_reference_format_request_body**](PathPostApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | +[**post_uri_reference_format_response_body_for_content_types**](PathPostApi.md#post_uri_reference_format_response_body_for_content_types) | **POST** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | +[**post_uri_template_format_request_body**](PathPostApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | +[**post_uri_template_format_response_body_for_content_types**](PathPostApi.md#post_uri_template_format_response_body_for_content_types) | **POST** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | + +# **post_additionalproperties_allows_a_schema_which_should_validate_request_body** +> post_additionalproperties_allows_a_schema_which_should_validate_request_body(additionalproperties_allows_a_schema_which_should_validate) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AdditionalpropertiesAllowsASchemaWhichShouldValidate( + foo=None, + bar=None, + ) + try: + api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %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 +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 +------------- | ------------- | ------------- +[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types** +> AdditionalpropertiesAllowsASchemaWhichShouldValidate post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | + + + +[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_are_allowed_by_default_request_body** +> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AdditionalpropertiesAreAllowedByDefault(None) + try: + api_response = api_instance.post_additionalproperties_are_allowed_by_default_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_additionalproperties_are_allowed_by_default_request_body: %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 +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 +------------- | ------------- | ------------- +[**AdditionalpropertiesAreAllowedByDefault**](AdditionalpropertiesAreAllowedByDefault.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_are_allowed_by_default_response_body_for_content_types** +> AdditionalpropertiesAreAllowedByDefault post_additionalproperties_are_allowed_by_default_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_are_allowed_by_default_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_additionalproperties_are_allowed_by_default_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesAreAllowedByDefault**](AdditionalpropertiesAreAllowedByDefault.md) | | + + + +[**AdditionalpropertiesAreAllowedByDefault**](AdditionalpropertiesAreAllowedByDefault.md) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_can_exist_by_itself_request_body** +> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AdditionalpropertiesCanExistByItself( + key=True, + ) + try: + api_response = api_instance.post_additionalproperties_can_exist_by_itself_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_additionalproperties_can_exist_by_itself_request_body: %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 +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 +------------- | ------------- | ------------- +[**AdditionalpropertiesCanExistByItself**](AdditionalpropertiesCanExistByItself.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_can_exist_by_itself_response_body_for_content_types** +> AdditionalpropertiesCanExistByItself post_additionalproperties_can_exist_by_itself_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_can_exist_by_itself_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_additionalproperties_can_exist_by_itself_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesCanExistByItself**](AdditionalpropertiesCanExistByItself.md) | | + + + +[**AdditionalpropertiesCanExistByItself**](AdditionalpropertiesCanExistByItself.md) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_should_not_look_in_applicators_request_body** +> post_additionalproperties_should_not_look_in_applicators_request_body(additionalproperties_should_not_look_in_applicators) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AdditionalpropertiesShouldNotLookInApplicators(None) + try: + api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_additionalproperties_should_not_look_in_applicators_request_body: %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 +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 +------------- | ------------- | ------------- +[**AdditionalpropertiesShouldNotLookInApplicators**](AdditionalpropertiesShouldNotLookInApplicators.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types** +> AdditionalpropertiesShouldNotLookInApplicators post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesShouldNotLookInApplicators**](AdditionalpropertiesShouldNotLookInApplicators.md) | | + + + +[**AdditionalpropertiesShouldNotLookInApplicators**](AdditionalpropertiesShouldNotLookInApplicators.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_combined_with_anyof_oneof_request_body** +> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofCombinedWithAnyofOneof(None) + try: + api_response = api_instance.post_allof_combined_with_anyof_oneof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_combined_with_anyof_oneof_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofCombinedWithAnyofOneof**](AllofCombinedWithAnyofOneof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_combined_with_anyof_oneof_response_body_for_content_types** +> AllofCombinedWithAnyofOneof post_allof_combined_with_anyof_oneof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_combined_with_anyof_oneof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_combined_with_anyof_oneof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofCombinedWithAnyofOneof**](AllofCombinedWithAnyofOneof.md) | | + + + +[**AllofCombinedWithAnyofOneof**](AllofCombinedWithAnyofOneof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_request_body** +> post_allof_request_body(allof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof import Allof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = Allof(None) + try: + api_response = api_instance.post_allof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_request_body: %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 +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 +------------- | ------------- | ------------- +[**Allof**](Allof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_response_body_for_content_types** +> Allof post_allof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof import Allof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Allof**](Allof.md) | | + + + +[**Allof**](Allof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_simple_types_request_body** +> post_allof_simple_types_request_body(allof_simple_types) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_simple_types import AllofSimpleTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofSimpleTypes(None) + try: + api_response = api_instance.post_allof_simple_types_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_simple_types_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofSimpleTypes**](AllofSimpleTypes.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_simple_types_response_body_for_content_types** +> AllofSimpleTypes post_allof_simple_types_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_simple_types import AllofSimpleTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_simple_types_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_simple_types_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofSimpleTypes**](AllofSimpleTypes.md) | | + + + +[**AllofSimpleTypes**](AllofSimpleTypes.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_base_schema_request_body** +> post_allof_with_base_schema_request_body(allof_with_base_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofWithBaseSchema({}) + try: + api_response = api_instance.post_allof_with_base_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_with_base_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofWithBaseSchema**](AllofWithBaseSchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_base_schema_response_body_for_content_types** +> AllofWithBaseSchema post_allof_with_base_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_base_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_with_base_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithBaseSchema**](AllofWithBaseSchema.md) | | + + + +[**AllofWithBaseSchema**](AllofWithBaseSchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_one_empty_schema_request_body** +> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofWithOneEmptySchema(None) + try: + api_response = api_instance.post_allof_with_one_empty_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_with_one_empty_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofWithOneEmptySchema**](AllofWithOneEmptySchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_one_empty_schema_response_body_for_content_types** +> AllofWithOneEmptySchema post_allof_with_one_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_one_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_with_one_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithOneEmptySchema**](AllofWithOneEmptySchema.md) | | + + + +[**AllofWithOneEmptySchema**](AllofWithOneEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_the_first_empty_schema_request_body** +> post_allof_with_the_first_empty_schema_request_body(allof_with_the_first_empty_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofWithTheFirstEmptySchema(None) + try: + api_response = api_instance.post_allof_with_the_first_empty_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_with_the_first_empty_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofWithTheFirstEmptySchema**](AllofWithTheFirstEmptySchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_the_first_empty_schema_response_body_for_content_types** +> AllofWithTheFirstEmptySchema post_allof_with_the_first_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_the_first_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_with_the_first_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithTheFirstEmptySchema**](AllofWithTheFirstEmptySchema.md) | | + + + +[**AllofWithTheFirstEmptySchema**](AllofWithTheFirstEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_the_last_empty_schema_request_body** +> post_allof_with_the_last_empty_schema_request_body(allof_with_the_last_empty_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofWithTheLastEmptySchema(None) + try: + api_response = api_instance.post_allof_with_the_last_empty_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_with_the_last_empty_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofWithTheLastEmptySchema**](AllofWithTheLastEmptySchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_the_last_empty_schema_response_body_for_content_types** +> AllofWithTheLastEmptySchema post_allof_with_the_last_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_the_last_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_with_the_last_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithTheLastEmptySchema**](AllofWithTheLastEmptySchema.md) | | + + + +[**AllofWithTheLastEmptySchema**](AllofWithTheLastEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_two_empty_schemas_request_body** +> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AllofWithTwoEmptySchemas(None) + try: + api_response = api_instance.post_allof_with_two_empty_schemas_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_with_two_empty_schemas_request_body: %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 +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 +------------- | ------------- | ------------- +[**AllofWithTwoEmptySchemas**](AllofWithTwoEmptySchemas.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_two_empty_schemas_response_body_for_content_types** +> AllofWithTwoEmptySchemas post_allof_with_two_empty_schemas_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_two_empty_schemas_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_allof_with_two_empty_schemas_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithTwoEmptySchemas**](AllofWithTwoEmptySchemas.md) | | + + + +[**AllofWithTwoEmptySchemas**](AllofWithTwoEmptySchemas.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_complex_types_request_body** +> post_anyof_complex_types_request_body(anyof_complex_types) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.anyof_complex_types import AnyofComplexTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AnyofComplexTypes(None) + try: + api_response = api_instance.post_anyof_complex_types_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_anyof_complex_types_request_body: %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 +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 +------------- | ------------- | ------------- +[**AnyofComplexTypes**](AnyofComplexTypes.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_complex_types_response_body_for_content_types** +> AnyofComplexTypes post_anyof_complex_types_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.anyof_complex_types import AnyofComplexTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_complex_types_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_anyof_complex_types_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AnyofComplexTypes**](AnyofComplexTypes.md) | | + + + +[**AnyofComplexTypes**](AnyofComplexTypes.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_request_body** +> post_anyof_request_body(anyof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.anyof import Anyof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = Anyof(None) + try: + api_response = api_instance.post_anyof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_anyof_request_body: %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 +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 +------------- | ------------- | ------------- +[**Anyof**](Anyof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_response_body_for_content_types** +> Anyof post_anyof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.anyof import Anyof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_anyof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Anyof**](Anyof.md) | | + + + +[**Anyof**](Anyof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_with_base_schema_request_body** +> post_anyof_with_base_schema_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AnyofWithBaseSchema("body_example") + try: + api_response = api_instance.post_anyof_with_base_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_anyof_with_base_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AnyofWithBaseSchema**](AnyofWithBaseSchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_with_base_schema_response_body_for_content_types** +> AnyofWithBaseSchema post_anyof_with_base_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_with_base_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_anyof_with_base_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AnyofWithBaseSchema**](AnyofWithBaseSchema.md) | | + + + +[**AnyofWithBaseSchema**](AnyofWithBaseSchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_with_one_empty_schema_request_body** +> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = AnyofWithOneEmptySchema(None) + try: + api_response = api_instance.post_anyof_with_one_empty_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_anyof_with_one_empty_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**AnyofWithOneEmptySchema**](AnyofWithOneEmptySchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_with_one_empty_schema_response_body_for_content_types** +> AnyofWithOneEmptySchema post_anyof_with_one_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_with_one_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_anyof_with_one_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AnyofWithOneEmptySchema**](AnyofWithOneEmptySchema.md) | | + + + +[**AnyofWithOneEmptySchema**](AnyofWithOneEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_array_type_matches_arrays_request_body** +> post_array_type_matches_arrays_request_body(array_type_matches_arrays) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = ArrayTypeMatchesArrays([ + None + ]) + try: + api_response = api_instance.post_array_type_matches_arrays_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_array_type_matches_arrays_request_body: %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 +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 +------------- | ------------- | ------------- +[**ArrayTypeMatchesArrays**](ArrayTypeMatchesArrays.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_array_type_matches_arrays_response_body_for_content_types** +> ArrayTypeMatchesArrays post_array_type_matches_arrays_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_array_type_matches_arrays_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_array_type_matches_arrays_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArrayTypeMatchesArrays**](ArrayTypeMatchesArrays.md) | | + + + +[**ArrayTypeMatchesArrays**](ArrayTypeMatchesArrays.md) + +### Authorization + +No authorization required + +[[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) + +# **post_boolean_type_matches_booleans_request_body** +> post_boolean_type_matches_booleans_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = True + try: + api_response = api_instance.post_boolean_type_matches_booleans_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_boolean_type_matches_booleans_request_body: %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 +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 +------------- | ------------- | ------------- +**bool** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_boolean_type_matches_booleans_response_body_for_content_types** +> bool post_boolean_type_matches_booleans_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_boolean_type_matches_booleans_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_boolean_type_matches_booleans_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**bool** | | + + +**bool** + +### Authorization + +No authorization required + +[[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) + +# **post_by_int_request_body** +> post_by_int_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.by_int import ByInt +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = ByInt(None) + try: + api_response = api_instance.post_by_int_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_by_int_request_body: %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 +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 +------------- | ------------- | ------------- +[**ByInt**](ByInt.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_by_int_response_body_for_content_types** +> ByInt post_by_int_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.by_int import ByInt +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_by_int_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_by_int_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ByInt**](ByInt.md) | | + + + +[**ByInt**](ByInt.md) + +### Authorization + +No authorization required + +[[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) + +# **post_by_number_request_body** +> post_by_number_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.by_number import ByNumber +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = ByNumber(None) + try: + api_response = api_instance.post_by_number_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_by_number_request_body: %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 +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 +------------- | ------------- | ------------- +[**ByNumber**](ByNumber.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_by_number_response_body_for_content_types** +> ByNumber post_by_number_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.by_number import ByNumber +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_by_number_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_by_number_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ByNumber**](ByNumber.md) | | + + + +[**ByNumber**](ByNumber.md) + +### Authorization + +No authorization required + +[[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) + +# **post_by_small_number_request_body** +> post_by_small_number_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.by_small_number import BySmallNumber +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = BySmallNumber(None) + try: + api_response = api_instance.post_by_small_number_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_by_small_number_request_body: %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 +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 +------------- | ------------- | ------------- +[**BySmallNumber**](BySmallNumber.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_by_small_number_response_body_for_content_types** +> BySmallNumber post_by_small_number_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.by_small_number import BySmallNumber +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_by_small_number_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_by_small_number_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**BySmallNumber**](BySmallNumber.md) | | + + + +[**BySmallNumber**](BySmallNumber.md) + +### Authorization + +No authorization required + +[[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) + +# **post_date_time_format_request_body** +> post_date_time_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_date_time_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_date_time_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_date_time_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_date_time_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_date_time_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_date_time_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_email_format_request_body** +> post_email_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_email_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_email_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_email_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_email_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_email_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_email_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with0_does_not_match_false_request_body** +> post_enum_with0_does_not_match_false_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumWith0DoesNotMatchFalse(0) + try: + api_response = api_instance.post_enum_with0_does_not_match_false_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enum_with0_does_not_match_false_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumWith0DoesNotMatchFalse**](EnumWith0DoesNotMatchFalse.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with0_does_not_match_false_response_body_for_content_types** +> EnumWith0DoesNotMatchFalse post_enum_with0_does_not_match_false_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with0_does_not_match_false_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enum_with0_does_not_match_false_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWith0DoesNotMatchFalse**](EnumWith0DoesNotMatchFalse.md) | | + + + +[**EnumWith0DoesNotMatchFalse**](EnumWith0DoesNotMatchFalse.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with1_does_not_match_true_request_body** +> post_enum_with1_does_not_match_true_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumWith1DoesNotMatchTrue(1) + try: + api_response = api_instance.post_enum_with1_does_not_match_true_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enum_with1_does_not_match_true_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumWith1DoesNotMatchTrue**](EnumWith1DoesNotMatchTrue.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with1_does_not_match_true_response_body_for_content_types** +> EnumWith1DoesNotMatchTrue post_enum_with1_does_not_match_true_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with1_does_not_match_true_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enum_with1_does_not_match_true_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWith1DoesNotMatchTrue**](EnumWith1DoesNotMatchTrue.md) | | + + + +[**EnumWith1DoesNotMatchTrue**](EnumWith1DoesNotMatchTrue.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_escaped_characters_request_body** +> post_enum_with_escaped_characters_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumWithEscapedCharacters("foo +bar") + try: + api_response = api_instance.post_enum_with_escaped_characters_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enum_with_escaped_characters_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumWithEscapedCharacters**](EnumWithEscapedCharacters.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_escaped_characters_response_body_for_content_types** +> EnumWithEscapedCharacters post_enum_with_escaped_characters_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with_escaped_characters_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enum_with_escaped_characters_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWithEscapedCharacters**](EnumWithEscapedCharacters.md) | | + + + +[**EnumWithEscapedCharacters**](EnumWithEscapedCharacters.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_false_does_not_match0_request_body** +> post_enum_with_false_does_not_match0_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumWithFalseDoesNotMatch0(False) + try: + api_response = api_instance.post_enum_with_false_does_not_match0_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enum_with_false_does_not_match0_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumWithFalseDoesNotMatch0**](EnumWithFalseDoesNotMatch0.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_false_does_not_match0_response_body_for_content_types** +> EnumWithFalseDoesNotMatch0 post_enum_with_false_does_not_match0_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with_false_does_not_match0_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enum_with_false_does_not_match0_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWithFalseDoesNotMatch0**](EnumWithFalseDoesNotMatch0.md) | | + + + +[**EnumWithFalseDoesNotMatch0**](EnumWithFalseDoesNotMatch0.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_true_does_not_match1_request_body** +> post_enum_with_true_does_not_match1_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumWithTrueDoesNotMatch1(True) + try: + api_response = api_instance.post_enum_with_true_does_not_match1_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enum_with_true_does_not_match1_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumWithTrueDoesNotMatch1**](EnumWithTrueDoesNotMatch1.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_true_does_not_match1_response_body_for_content_types** +> EnumWithTrueDoesNotMatch1 post_enum_with_true_does_not_match1_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with_true_does_not_match1_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enum_with_true_does_not_match1_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWithTrueDoesNotMatch1**](EnumWithTrueDoesNotMatch1.md) | | + + + +[**EnumWithTrueDoesNotMatch1**](EnumWithTrueDoesNotMatch1.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enums_in_properties_request_body** +> post_enums_in_properties_request_body(enums_in_properties) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enums_in_properties import EnumsInProperties +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = EnumsInProperties( + foo="foo", + bar="bar", + ) + try: + api_response = api_instance.post_enums_in_properties_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enums_in_properties_request_body: %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 +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 +------------- | ------------- | ------------- +[**EnumsInProperties**](EnumsInProperties.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_enums_in_properties_response_body_for_content_types** +> EnumsInProperties post_enums_in_properties_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.enums_in_properties import EnumsInProperties +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enums_in_properties_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_enums_in_properties_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumsInProperties**](EnumsInProperties.md) | | + + + +[**EnumsInProperties**](EnumsInProperties.md) + +### Authorization + +No authorization required + +[[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) + +# **post_forbidden_property_request_body** +> post_forbidden_property_request_body(forbidden_property) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.forbidden_property import ForbiddenProperty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = ForbiddenProperty(None) + try: + api_response = api_instance.post_forbidden_property_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_forbidden_property_request_body: %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 +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 +------------- | ------------- | ------------- +[**ForbiddenProperty**](ForbiddenProperty.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_forbidden_property_response_body_for_content_types** +> ForbiddenProperty post_forbidden_property_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.forbidden_property import ForbiddenProperty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_forbidden_property_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_forbidden_property_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ForbiddenProperty**](ForbiddenProperty.md) | | + + + +[**ForbiddenProperty**](ForbiddenProperty.md) + +### Authorization + +No authorization required + +[[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) + +# **post_hostname_format_request_body** +> post_hostname_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_hostname_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_hostname_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_hostname_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_hostname_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_hostname_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_hostname_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_integer_type_matches_integers_request_body** +> post_integer_type_matches_integers_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = 1 + try: + api_response = api_instance.post_integer_type_matches_integers_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_integer_type_matches_integers_request_body: %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 +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 +------------- | ------------- | ------------- +**int** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_integer_type_matches_integers_response_body_for_content_types** +> int post_integer_type_matches_integers_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_integer_type_matches_integers_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_integer_type_matches_integers_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + + +**int** + +### Authorization + +No authorization required + +[[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) + +# **post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body** +> post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(1) + try: + api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %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 +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 +------------- | ------------- | ------------- +[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types** +> InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | + + + +[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) + +### Authorization + +No authorization required + +[[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) + +# **post_invalid_string_value_for_default_request_body** +> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = InvalidStringValueForDefault(None) + try: + api_response = api_instance.post_invalid_string_value_for_default_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_invalid_string_value_for_default_request_body: %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 +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 +------------- | ------------- | ------------- +[**InvalidStringValueForDefault**](InvalidStringValueForDefault.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_invalid_string_value_for_default_response_body_for_content_types** +> InvalidStringValueForDefault post_invalid_string_value_for_default_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_invalid_string_value_for_default_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_invalid_string_value_for_default_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**InvalidStringValueForDefault**](InvalidStringValueForDefault.md) | | + + + +[**InvalidStringValueForDefault**](InvalidStringValueForDefault.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ipv4_format_request_body** +> post_ipv4_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_ipv4_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ipv4_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ipv4_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_ipv4_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ipv4_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ipv4_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_ipv6_format_request_body** +> post_ipv6_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_ipv6_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ipv6_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ipv6_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_ipv6_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ipv6_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ipv6_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_json_pointer_format_request_body** +> post_json_pointer_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_json_pointer_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_json_pointer_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_json_pointer_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_json_pointer_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_json_pointer_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_json_pointer_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_maximum_validation_request_body** +> post_maximum_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maximum_validation import MaximumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = MaximumValidation(None) + try: + api_response = api_instance.post_maximum_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maximum_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MaximumValidation**](MaximumValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maximum_validation_response_body_for_content_types** +> MaximumValidation post_maximum_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maximum_validation import MaximumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maximum_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maximum_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaximumValidation**](MaximumValidation.md) | | + + + +[**MaximumValidation**](MaximumValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maximum_validation_with_unsigned_integer_request_body** +> post_maximum_validation_with_unsigned_integer_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = MaximumValidationWithUnsignedInteger(None) + try: + api_response = api_instance.post_maximum_validation_with_unsigned_integer_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maximum_validation_with_unsigned_integer_request_body: %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 +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 +------------- | ------------- | ------------- +[**MaximumValidationWithUnsignedInteger**](MaximumValidationWithUnsignedInteger.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maximum_validation_with_unsigned_integer_response_body_for_content_types** +> MaximumValidationWithUnsignedInteger post_maximum_validation_with_unsigned_integer_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maximum_validation_with_unsigned_integer_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maximum_validation_with_unsigned_integer_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaximumValidationWithUnsignedInteger**](MaximumValidationWithUnsignedInteger.md) | | + + + +[**MaximumValidationWithUnsignedInteger**](MaximumValidationWithUnsignedInteger.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxitems_validation_request_body** +> post_maxitems_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maxitems_validation import MaxitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = MaxitemsValidation(None) + try: + api_response = api_instance.post_maxitems_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maxitems_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MaxitemsValidation**](MaxitemsValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maxitems_validation_response_body_for_content_types** +> MaxitemsValidation post_maxitems_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maxitems_validation import MaxitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxitems_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maxitems_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaxitemsValidation**](MaxitemsValidation.md) | | + + + +[**MaxitemsValidation**](MaxitemsValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxlength_validation_request_body** +> post_maxlength_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maxlength_validation import MaxlengthValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = MaxlengthValidation(None) + try: + api_response = api_instance.post_maxlength_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maxlength_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MaxlengthValidation**](MaxlengthValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maxlength_validation_response_body_for_content_types** +> MaxlengthValidation post_maxlength_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maxlength_validation import MaxlengthValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxlength_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maxlength_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaxlengthValidation**](MaxlengthValidation.md) | | + + + +[**MaxlengthValidation**](MaxlengthValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxproperties0_means_the_object_is_empty_request_body** +> post_maxproperties0_means_the_object_is_empty_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = Maxproperties0MeansTheObjectIsEmpty(None) + try: + api_response = api_instance.post_maxproperties0_means_the_object_is_empty_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maxproperties0_means_the_object_is_empty_request_body: %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 +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 +------------- | ------------- | ------------- +[**Maxproperties0MeansTheObjectIsEmpty**](Maxproperties0MeansTheObjectIsEmpty.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maxproperties0_means_the_object_is_empty_response_body_for_content_types** +> Maxproperties0MeansTheObjectIsEmpty post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maxproperties0_means_the_object_is_empty_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Maxproperties0MeansTheObjectIsEmpty**](Maxproperties0MeansTheObjectIsEmpty.md) | | + + + +[**Maxproperties0MeansTheObjectIsEmpty**](Maxproperties0MeansTheObjectIsEmpty.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxproperties_validation_request_body** +> post_maxproperties_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = MaxpropertiesValidation(None) + try: + api_response = api_instance.post_maxproperties_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maxproperties_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MaxpropertiesValidation**](MaxpropertiesValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_maxproperties_validation_response_body_for_content_types** +> MaxpropertiesValidation post_maxproperties_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxproperties_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_maxproperties_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaxpropertiesValidation**](MaxpropertiesValidation.md) | | + + + +[**MaxpropertiesValidation**](MaxpropertiesValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minimum_validation_request_body** +> post_minimum_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.minimum_validation import MinimumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = MinimumValidation(None) + try: + api_response = api_instance.post_minimum_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_minimum_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MinimumValidation**](MinimumValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_minimum_validation_response_body_for_content_types** +> MinimumValidation post_minimum_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.minimum_validation import MinimumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minimum_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_minimum_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinimumValidation**](MinimumValidation.md) | | + + + +[**MinimumValidation**](MinimumValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minimum_validation_with_signed_integer_request_body** +> post_minimum_validation_with_signed_integer_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = MinimumValidationWithSignedInteger(None) + try: + api_response = api_instance.post_minimum_validation_with_signed_integer_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_minimum_validation_with_signed_integer_request_body: %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 +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 +------------- | ------------- | ------------- +[**MinimumValidationWithSignedInteger**](MinimumValidationWithSignedInteger.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_minimum_validation_with_signed_integer_response_body_for_content_types** +> MinimumValidationWithSignedInteger post_minimum_validation_with_signed_integer_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minimum_validation_with_signed_integer_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_minimum_validation_with_signed_integer_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinimumValidationWithSignedInteger**](MinimumValidationWithSignedInteger.md) | | + + + +[**MinimumValidationWithSignedInteger**](MinimumValidationWithSignedInteger.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minitems_validation_request_body** +> post_minitems_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.minitems_validation import MinitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = MinitemsValidation(None) + try: + api_response = api_instance.post_minitems_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_minitems_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MinitemsValidation**](MinitemsValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_minitems_validation_response_body_for_content_types** +> MinitemsValidation post_minitems_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.minitems_validation import MinitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minitems_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_minitems_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinitemsValidation**](MinitemsValidation.md) | | + + + +[**MinitemsValidation**](MinitemsValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minlength_validation_request_body** +> post_minlength_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.minlength_validation import MinlengthValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = MinlengthValidation(None) + try: + api_response = api_instance.post_minlength_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_minlength_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MinlengthValidation**](MinlengthValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_minlength_validation_response_body_for_content_types** +> MinlengthValidation post_minlength_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.minlength_validation import MinlengthValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minlength_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_minlength_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinlengthValidation**](MinlengthValidation.md) | | + + + +[**MinlengthValidation**](MinlengthValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minproperties_validation_request_body** +> post_minproperties_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.minproperties_validation import MinpropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = MinpropertiesValidation(None) + try: + api_response = api_instance.post_minproperties_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_minproperties_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**MinpropertiesValidation**](MinpropertiesValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_minproperties_validation_response_body_for_content_types** +> MinpropertiesValidation post_minproperties_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.minproperties_validation import MinpropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minproperties_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_minproperties_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinpropertiesValidation**](MinpropertiesValidation.md) | | + + + +[**MinpropertiesValidation**](MinpropertiesValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_allof_to_check_validation_semantics_request_body** +> post_nested_allof_to_check_validation_semantics_request_body(nested_allof_to_check_validation_semantics) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = NestedAllofToCheckValidationSemantics(None) + try: + api_response = api_instance.post_nested_allof_to_check_validation_semantics_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_nested_allof_to_check_validation_semantics_request_body: %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 +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 +------------- | ------------- | ------------- +[**NestedAllofToCheckValidationSemantics**](NestedAllofToCheckValidationSemantics.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_allof_to_check_validation_semantics_response_body_for_content_types** +> NestedAllofToCheckValidationSemantics post_nested_allof_to_check_validation_semantics_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_allof_to_check_validation_semantics_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_nested_allof_to_check_validation_semantics_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedAllofToCheckValidationSemantics**](NestedAllofToCheckValidationSemantics.md) | | + + + +[**NestedAllofToCheckValidationSemantics**](NestedAllofToCheckValidationSemantics.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_anyof_to_check_validation_semantics_request_body** +> post_nested_anyof_to_check_validation_semantics_request_body(nested_anyof_to_check_validation_semantics) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = NestedAnyofToCheckValidationSemantics(None) + try: + api_response = api_instance.post_nested_anyof_to_check_validation_semantics_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_nested_anyof_to_check_validation_semantics_request_body: %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 +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 +------------- | ------------- | ------------- +[**NestedAnyofToCheckValidationSemantics**](NestedAnyofToCheckValidationSemantics.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_anyof_to_check_validation_semantics_response_body_for_content_types** +> NestedAnyofToCheckValidationSemantics post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_nested_anyof_to_check_validation_semantics_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedAnyofToCheckValidationSemantics**](NestedAnyofToCheckValidationSemantics.md) | | + + + +[**NestedAnyofToCheckValidationSemantics**](NestedAnyofToCheckValidationSemantics.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_items_request_body** +> post_nested_items_request_body(nested_items) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.nested_items import NestedItems +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = NestedItems([ + [ + [ + [ + 3.14 + ] + ] + ] + ]) + try: + api_response = api_instance.post_nested_items_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_nested_items_request_body: %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 +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 +------------- | ------------- | ------------- +[**NestedItems**](NestedItems.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_items_response_body_for_content_types** +> NestedItems post_nested_items_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.nested_items import NestedItems +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_items_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_nested_items_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedItems**](NestedItems.md) | | + + + +[**NestedItems**](NestedItems.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_oneof_to_check_validation_semantics_request_body** +> post_nested_oneof_to_check_validation_semantics_request_body(nested_oneof_to_check_validation_semantics) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = NestedOneofToCheckValidationSemantics(None) + try: + api_response = api_instance.post_nested_oneof_to_check_validation_semantics_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_nested_oneof_to_check_validation_semantics_request_body: %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 +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 +------------- | ------------- | ------------- +[**NestedOneofToCheckValidationSemantics**](NestedOneofToCheckValidationSemantics.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_oneof_to_check_validation_semantics_response_body_for_content_types** +> NestedOneofToCheckValidationSemantics post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_nested_oneof_to_check_validation_semantics_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedOneofToCheckValidationSemantics**](NestedOneofToCheckValidationSemantics.md) | | + + + +[**NestedOneofToCheckValidationSemantics**](NestedOneofToCheckValidationSemantics.md) + +### Authorization + +No authorization required + +[[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) + +# **post_not_more_complex_schema_request_body** +> post_not_more_complex_schema_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_not_more_complex_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_not_more_complex_schema_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_not_more_complex_schema_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_not_more_complex_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_not_more_complex_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_not_request_body** +> post_not_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_not_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_not_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_not_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_not_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_not_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_not_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_nul_characters_in_strings_request_body** +> post_nul_characters_in_strings_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = NulCharactersInStrings("hellothere") + try: + api_response = api_instance.post_nul_characters_in_strings_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_nul_characters_in_strings_request_body: %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 +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 +------------- | ------------- | ------------- +[**NulCharactersInStrings**](NulCharactersInStrings.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_nul_characters_in_strings_response_body_for_content_types** +> NulCharactersInStrings post_nul_characters_in_strings_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nul_characters_in_strings_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_nul_characters_in_strings_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NulCharactersInStrings**](NulCharactersInStrings.md) | | + + + +[**NulCharactersInStrings**](NulCharactersInStrings.md) + +### Authorization + +No authorization required + +[[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) + +# **post_null_type_matches_only_the_null_object_request_body** +> post_null_type_matches_only_the_null_object_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_null_type_matches_only_the_null_object_request_body: %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 +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 +------------- | ------------- | ------------- +**none_type** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_null_type_matches_only_the_null_object_response_body_for_content_types** +> none_type post_null_type_matches_only_the_null_object_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_null_type_matches_only_the_null_object_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_null_type_matches_only_the_null_object_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**none_type** | | + + +**none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_number_type_matches_numbers_request_body** +> post_number_type_matches_numbers_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = 3.14 + try: + api_response = api_instance.post_number_type_matches_numbers_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_number_type_matches_numbers_request_body: %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 +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 +------------- | ------------- | ------------- +**int, float** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_number_type_matches_numbers_response_body_for_content_types** +> int, float post_number_type_matches_numbers_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_number_type_matches_numbers_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_number_type_matches_numbers_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**int, float** | | + + +**int, float** + +### Authorization + +No authorization required + +[[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) + +# **post_object_properties_validation_request_body** +> post_object_properties_validation_request_body(object_properties_validation) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = ObjectPropertiesValidation(None) + try: + api_response = api_instance.post_object_properties_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_object_properties_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**ObjectPropertiesValidation**](ObjectPropertiesValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_object_properties_validation_response_body_for_content_types** +> ObjectPropertiesValidation post_object_properties_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_object_properties_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_object_properties_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectPropertiesValidation**](ObjectPropertiesValidation.md) | | + + + +[**ObjectPropertiesValidation**](ObjectPropertiesValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_object_type_matches_objects_request_body** +> post_object_type_matches_objects_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = dict() + try: + api_response = api_instance.post_object_type_matches_objects_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_object_type_matches_objects_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_object_type_matches_objects_response_body_for_content_types** +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} post_object_type_matches_objects_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_object_type_matches_objects_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_object_type_matches_objects_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_oneof_complex_types_request_body** +> post_oneof_complex_types_request_body(oneof_complex_types) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.oneof_complex_types import OneofComplexTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = OneofComplexTypes(None) + try: + api_response = api_instance.post_oneof_complex_types_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_oneof_complex_types_request_body: %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 +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 +------------- | ------------- | ------------- +[**OneofComplexTypes**](OneofComplexTypes.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_complex_types_response_body_for_content_types** +> OneofComplexTypes post_oneof_complex_types_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.oneof_complex_types import OneofComplexTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_complex_types_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_oneof_complex_types_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OneofComplexTypes**](OneofComplexTypes.md) | | + + + +[**OneofComplexTypes**](OneofComplexTypes.md) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_request_body** +> post_oneof_request_body(oneof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.oneof import Oneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = Oneof(None) + try: + api_response = api_instance.post_oneof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_oneof_request_body: %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 +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 +------------- | ------------- | ------------- +[**Oneof**](Oneof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_response_body_for_content_types** +> Oneof post_oneof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.oneof import Oneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_oneof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Oneof**](Oneof.md) | | + + + +[**Oneof**](Oneof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_with_base_schema_request_body** +> post_oneof_with_base_schema_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = OneofWithBaseSchema("body_example") + try: + api_response = api_instance.post_oneof_with_base_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_oneof_with_base_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**OneofWithBaseSchema**](OneofWithBaseSchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_with_base_schema_response_body_for_content_types** +> OneofWithBaseSchema post_oneof_with_base_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_with_base_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_oneof_with_base_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OneofWithBaseSchema**](OneofWithBaseSchema.md) | | + + + +[**OneofWithBaseSchema**](OneofWithBaseSchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_with_empty_schema_request_body** +> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = OneofWithEmptySchema(None) + try: + api_response = api_instance.post_oneof_with_empty_schema_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_oneof_with_empty_schema_request_body: %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 +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 +------------- | ------------- | ------------- +[**OneofWithEmptySchema**](OneofWithEmptySchema.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_with_empty_schema_response_body_for_content_types** +> OneofWithEmptySchema post_oneof_with_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_with_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_oneof_with_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OneofWithEmptySchema**](OneofWithEmptySchema.md) | | + + + +[**OneofWithEmptySchema**](OneofWithEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_pattern_is_not_anchored_request_body** +> post_pattern_is_not_anchored_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = PatternIsNotAnchored(None) + try: + api_response = api_instance.post_pattern_is_not_anchored_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_pattern_is_not_anchored_request_body: %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 +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 +------------- | ------------- | ------------- +[**PatternIsNotAnchored**](PatternIsNotAnchored.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_pattern_is_not_anchored_response_body_for_content_types** +> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_pattern_is_not_anchored_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_pattern_is_not_anchored_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PatternIsNotAnchored**](PatternIsNotAnchored.md) | | + + + +[**PatternIsNotAnchored**](PatternIsNotAnchored.md) + +### Authorization + +No authorization required + +[[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) + +# **post_pattern_validation_request_body** +> post_pattern_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.pattern_validation import PatternValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = PatternValidation(None) + try: + api_response = api_instance.post_pattern_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_pattern_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**PatternValidation**](PatternValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_pattern_validation_response_body_for_content_types** +> PatternValidation post_pattern_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.pattern_validation import PatternValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_pattern_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_pattern_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PatternValidation**](PatternValidation.md) | | + + + +[**PatternValidation**](PatternValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_properties_with_escaped_characters_request_body** +> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = PropertiesWithEscapedCharacters(None) + try: + api_response = api_instance.post_properties_with_escaped_characters_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_properties_with_escaped_characters_request_body: %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 +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 +------------- | ------------- | ------------- +[**PropertiesWithEscapedCharacters**](PropertiesWithEscapedCharacters.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_properties_with_escaped_characters_response_body_for_content_types** +> PropertiesWithEscapedCharacters post_properties_with_escaped_characters_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_properties_with_escaped_characters_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_properties_with_escaped_characters_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PropertiesWithEscapedCharacters**](PropertiesWithEscapedCharacters.md) | | + + + +[**PropertiesWithEscapedCharacters**](PropertiesWithEscapedCharacters.md) + +### Authorization + +No authorization required + +[[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) + +# **post_property_named_ref_that_is_not_a_reference_request_body** +> post_property_named_ref_that_is_not_a_reference_request_body(property_named_ref_that_is_not_a_reference) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = PropertyNamedRefThatIsNotAReference(None) + try: + api_response = api_instance.post_property_named_ref_that_is_not_a_reference_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_property_named_ref_that_is_not_a_reference_request_body: %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 +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 +------------- | ------------- | ------------- +[**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_property_named_ref_that_is_not_a_reference_response_body_for_content_types** +> PropertyNamedRefThatIsNotAReference post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_property_named_ref_that_is_not_a_reference_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | + + + +[**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_additionalproperties_request_body** +> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInAdditionalproperties( + key=PropertyNamedRefThatIsNotAReference(None), + ) + try: + api_response = api_instance.post_ref_in_additionalproperties_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_additionalproperties_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInAdditionalproperties**](RefInAdditionalproperties.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_additionalproperties_response_body_for_content_types** +> RefInAdditionalproperties post_ref_in_additionalproperties_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_additionalproperties_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_additionalproperties_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInAdditionalproperties**](RefInAdditionalproperties.md) | | + + + +[**RefInAdditionalproperties**](RefInAdditionalproperties.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_allof_request_body** +> post_ref_in_allof_request_body(ref_in_allof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_allof import RefInAllof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInAllof(None) + try: + api_response = api_instance.post_ref_in_allof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_allof_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInAllof**](RefInAllof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_allof_response_body_for_content_types** +> RefInAllof post_ref_in_allof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_allof import RefInAllof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_allof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_allof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInAllof**](RefInAllof.md) | | + + + +[**RefInAllof**](RefInAllof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_anyof_request_body** +> post_ref_in_anyof_request_body(ref_in_anyof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_anyof import RefInAnyof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInAnyof(None) + try: + api_response = api_instance.post_ref_in_anyof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_anyof_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInAnyof**](RefInAnyof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_anyof_response_body_for_content_types** +> RefInAnyof post_ref_in_anyof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_anyof import RefInAnyof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_anyof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_anyof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInAnyof**](RefInAnyof.md) | | + + + +[**RefInAnyof**](RefInAnyof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_items_request_body** +> post_ref_in_items_request_body(ref_in_items) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_items import RefInItems +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInItems([ + PropertyNamedRefThatIsNotAReference(None) + ]) + try: + api_response = api_instance.post_ref_in_items_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_items_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInItems**](RefInItems.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_items_response_body_for_content_types** +> RefInItems post_ref_in_items_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_items import RefInItems +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_items_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_items_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInItems**](RefInItems.md) | | + + + +[**RefInItems**](RefInItems.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_oneof_request_body** +> post_ref_in_oneof_request_body(ref_in_oneof) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_oneof import RefInOneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInOneof(None) + try: + api_response = api_instance.post_ref_in_oneof_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_oneof_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInOneof**](RefInOneof.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_oneof_response_body_for_content_types** +> RefInOneof post_ref_in_oneof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_oneof import RefInOneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_oneof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_oneof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInOneof**](RefInOneof.md) | | + + + +[**RefInOneof**](RefInOneof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_property_request_body** +> post_ref_in_property_request_body(ref_in_property) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_property import RefInProperty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = RefInProperty(None) + try: + api_response = api_instance.post_ref_in_property_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_property_request_body: %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 +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 +------------- | ------------- | ------------- +[**RefInProperty**](RefInProperty.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_property_response_body_for_content_types** +> RefInProperty post_ref_in_property_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.ref_in_property import RefInProperty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_property_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_ref_in_property_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInProperty**](RefInProperty.md) | | + + + +[**RefInProperty**](RefInProperty.md) + +### Authorization + +No authorization required + +[[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) + +# **post_required_default_validation_request_body** +> post_required_default_validation_request_body(required_default_validation) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.required_default_validation import RequiredDefaultValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = RequiredDefaultValidation(None) + try: + api_response = api_instance.post_required_default_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_required_default_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**RequiredDefaultValidation**](RequiredDefaultValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_required_default_validation_response_body_for_content_types** +> RequiredDefaultValidation post_required_default_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.required_default_validation import RequiredDefaultValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_required_default_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_required_default_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredDefaultValidation**](RequiredDefaultValidation.md) | | + + + +[**RequiredDefaultValidation**](RequiredDefaultValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_required_validation_request_body** +> post_required_validation_request_body(required_validation) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.required_validation import RequiredValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = RequiredValidation(None) + try: + api_response = api_instance.post_required_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_required_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**RequiredValidation**](RequiredValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_required_validation_response_body_for_content_types** +> RequiredValidation post_required_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.required_validation import RequiredValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_required_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_required_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredValidation**](RequiredValidation.md) | | + + + +[**RequiredValidation**](RequiredValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_required_with_empty_array_request_body** +> post_required_with_empty_array_request_body(required_with_empty_array) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = RequiredWithEmptyArray(None) + try: + api_response = api_instance.post_required_with_empty_array_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_required_with_empty_array_request_body: %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 +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 +------------- | ------------- | ------------- +[**RequiredWithEmptyArray**](RequiredWithEmptyArray.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_required_with_empty_array_response_body_for_content_types** +> RequiredWithEmptyArray post_required_with_empty_array_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_required_with_empty_array_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_required_with_empty_array_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredWithEmptyArray**](RequiredWithEmptyArray.md) | | + + + +[**RequiredWithEmptyArray**](RequiredWithEmptyArray.md) + +### Authorization + +No authorization required + +[[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) + +# **post_simple_enum_validation_request_body** +> post_simple_enum_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.simple_enum_validation import SimpleEnumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = SimpleEnumValidation(1) + try: + api_response = api_instance.post_simple_enum_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_simple_enum_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**SimpleEnumValidation**](SimpleEnumValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_simple_enum_validation_response_body_for_content_types** +> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.simple_enum_validation import SimpleEnumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_simple_enum_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_simple_enum_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**SimpleEnumValidation**](SimpleEnumValidation.md) | | + + + +[**SimpleEnumValidation**](SimpleEnumValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_string_type_matches_strings_request_body** +> post_string_type_matches_strings_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = "body_example" + try: + api_response = api_instance.post_string_type_matches_strings_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_string_type_matches_strings_request_body: %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 +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 +------------- | ------------- | ------------- +**str** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_string_type_matches_strings_response_body_for_content_types** +> str post_string_type_matches_strings_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_string_type_matches_strings_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_string_type_matches_strings_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + + +**str** + +### Authorization + +No authorization required + +[[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) + +# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body** +> post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(the_default_keyword_does_not_do_anything_if_the_property_is_missing) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( + alpha=5, + ) + try: + api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %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 +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 +------------- | ------------- | ------------- +[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types** +> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | + + + +[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) + +### Authorization + +No authorization required + +[[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) + +# **post_uniqueitems_false_validation_request_body** +> post_uniqueitems_false_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = UniqueitemsFalseValidation(None) + try: + api_response = api_instance.post_uniqueitems_false_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_uniqueitems_false_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**UniqueitemsFalseValidation**](UniqueitemsFalseValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_uniqueitems_false_validation_response_body_for_content_types** +> UniqueitemsFalseValidation post_uniqueitems_false_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uniqueitems_false_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_uniqueitems_false_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UniqueitemsFalseValidation**](UniqueitemsFalseValidation.md) | | + + + +[**UniqueitemsFalseValidation**](UniqueitemsFalseValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_uniqueitems_validation_request_body** +> post_uniqueitems_validation_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = UniqueitemsValidation(None) + try: + api_response = api_instance.post_uniqueitems_validation_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_uniqueitems_validation_request_body: %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 +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 +------------- | ------------- | ------------- +[**UniqueitemsValidation**](UniqueitemsValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_uniqueitems_validation_response_body_for_content_types** +> UniqueitemsValidation post_uniqueitems_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uniqueitems_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_uniqueitems_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UniqueitemsValidation**](UniqueitemsValidation.md) | | + + + +[**UniqueitemsValidation**](UniqueitemsValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_uri_format_request_body** +> post_uri_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_uri_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_uri_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_uri_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_uri_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uri_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_uri_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_uri_reference_format_request_body** +> post_uri_reference_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_uri_reference_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_uri_reference_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_uri_reference_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_uri_reference_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uri_reference_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_uri_reference_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_uri_template_format_request_body** +> post_uri_template_format_request_body(body) + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example passing only required values which don't have defaults set + body = None + try: + api_response = api_instance.post_uri_template_format_request_body( + body=body, + ) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_uri_template_format_request_body: %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 +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 + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +No authorization required + +[[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) + +# **post_uri_template_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_uri_template_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import path_post_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = path_post_api.PathPostApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uri_template_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling PathPostApi->post_uri_template_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/PostApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/PostApi.md deleted file mode 100644 index cfb3dc18ae4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/PostApi.md +++ /dev/null @@ -1,6243 +0,0 @@ -# unit_test_api.PostApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](PostApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **POST** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -[**post_additionalproperties_are_allowed_by_default_request_body**](PostApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **POST** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -[**post_additionalproperties_can_exist_by_itself_request_body**](PostApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **POST** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -[**post_additionalproperties_should_not_look_in_applicators_request_body**](PostApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **POST** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -[**post_allof_combined_with_anyof_oneof_request_body**](PostApi.md#post_allof_combined_with_anyof_oneof_request_body) | **POST** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -[**post_allof_request_body**](PostApi.md#post_allof_request_body) | **POST** /requestBody/postAllofRequestBody | -[**post_allof_simple_types_request_body**](PostApi.md#post_allof_simple_types_request_body) | **POST** /requestBody/postAllofSimpleTypesRequestBody | -[**post_allof_with_base_schema_request_body**](PostApi.md#post_allof_with_base_schema_request_body) | **POST** /requestBody/postAllofWithBaseSchemaRequestBody | -[**post_allof_with_one_empty_schema_request_body**](PostApi.md#post_allof_with_one_empty_schema_request_body) | **POST** /requestBody/postAllofWithOneEmptySchemaRequestBody | -[**post_allof_with_the_first_empty_schema_request_body**](PostApi.md#post_allof_with_the_first_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -[**post_allof_with_the_last_empty_schema_request_body**](PostApi.md#post_allof_with_the_last_empty_schema_request_body) | **POST** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -[**post_allof_with_two_empty_schemas_request_body**](PostApi.md#post_allof_with_two_empty_schemas_request_body) | **POST** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -[**post_anyof_complex_types_request_body**](PostApi.md#post_anyof_complex_types_request_body) | **POST** /requestBody/postAnyofComplexTypesRequestBody | -[**post_anyof_request_body**](PostApi.md#post_anyof_request_body) | **POST** /requestBody/postAnyofRequestBody | -[**post_anyof_with_base_schema_request_body**](PostApi.md#post_anyof_with_base_schema_request_body) | **POST** /requestBody/postAnyofWithBaseSchemaRequestBody | -[**post_anyof_with_one_empty_schema_request_body**](PostApi.md#post_anyof_with_one_empty_schema_request_body) | **POST** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -[**post_array_type_matches_arrays_request_body**](PostApi.md#post_array_type_matches_arrays_request_body) | **POST** /requestBody/postArrayTypeMatchesArraysRequestBody | -[**post_boolean_type_matches_booleans_request_body**](PostApi.md#post_boolean_type_matches_booleans_request_body) | **POST** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -[**post_by_int_request_body**](PostApi.md#post_by_int_request_body) | **POST** /requestBody/postByIntRequestBody | -[**post_by_number_request_body**](PostApi.md#post_by_number_request_body) | **POST** /requestBody/postByNumberRequestBody | -[**post_by_small_number_request_body**](PostApi.md#post_by_small_number_request_body) | **POST** /requestBody/postBySmallNumberRequestBody | -[**post_date_time_format_request_body**](PostApi.md#post_date_time_format_request_body) | **POST** /requestBody/postDateTimeFormatRequestBody | -[**post_email_format_request_body**](PostApi.md#post_email_format_request_body) | **POST** /requestBody/postEmailFormatRequestBody | -[**post_enum_with0_does_not_match_false_request_body**](PostApi.md#post_enum_with0_does_not_match_false_request_body) | **POST** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -[**post_enum_with1_does_not_match_true_request_body**](PostApi.md#post_enum_with1_does_not_match_true_request_body) | **POST** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -[**post_enum_with_escaped_characters_request_body**](PostApi.md#post_enum_with_escaped_characters_request_body) | **POST** /requestBody/postEnumWithEscapedCharactersRequestBody | -[**post_enum_with_false_does_not_match0_request_body**](PostApi.md#post_enum_with_false_does_not_match0_request_body) | **POST** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -[**post_enum_with_true_does_not_match1_request_body**](PostApi.md#post_enum_with_true_does_not_match1_request_body) | **POST** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -[**post_enums_in_properties_request_body**](PostApi.md#post_enums_in_properties_request_body) | **POST** /requestBody/postEnumsInPropertiesRequestBody | -[**post_forbidden_property_request_body**](PostApi.md#post_forbidden_property_request_body) | **POST** /requestBody/postForbiddenPropertyRequestBody | -[**post_hostname_format_request_body**](PostApi.md#post_hostname_format_request_body) | **POST** /requestBody/postHostnameFormatRequestBody | -[**post_integer_type_matches_integers_request_body**](PostApi.md#post_integer_type_matches_integers_request_body) | **POST** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -[**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](PostApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **POST** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -[**post_invalid_string_value_for_default_request_body**](PostApi.md#post_invalid_string_value_for_default_request_body) | **POST** /requestBody/postInvalidStringValueForDefaultRequestBody | -[**post_ipv4_format_request_body**](PostApi.md#post_ipv4_format_request_body) | **POST** /requestBody/postIpv4FormatRequestBody | -[**post_ipv6_format_request_body**](PostApi.md#post_ipv6_format_request_body) | **POST** /requestBody/postIpv6FormatRequestBody | -[**post_json_pointer_format_request_body**](PostApi.md#post_json_pointer_format_request_body) | **POST** /requestBody/postJsonPointerFormatRequestBody | -[**post_maximum_validation_request_body**](PostApi.md#post_maximum_validation_request_body) | **POST** /requestBody/postMaximumValidationRequestBody | -[**post_maximum_validation_with_unsigned_integer_request_body**](PostApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **POST** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -[**post_maxitems_validation_request_body**](PostApi.md#post_maxitems_validation_request_body) | **POST** /requestBody/postMaxitemsValidationRequestBody | -[**post_maxlength_validation_request_body**](PostApi.md#post_maxlength_validation_request_body) | **POST** /requestBody/postMaxlengthValidationRequestBody | -[**post_maxproperties0_means_the_object_is_empty_request_body**](PostApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **POST** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -[**post_maxproperties_validation_request_body**](PostApi.md#post_maxproperties_validation_request_body) | **POST** /requestBody/postMaxpropertiesValidationRequestBody | -[**post_minimum_validation_request_body**](PostApi.md#post_minimum_validation_request_body) | **POST** /requestBody/postMinimumValidationRequestBody | -[**post_minimum_validation_with_signed_integer_request_body**](PostApi.md#post_minimum_validation_with_signed_integer_request_body) | **POST** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -[**post_minitems_validation_request_body**](PostApi.md#post_minitems_validation_request_body) | **POST** /requestBody/postMinitemsValidationRequestBody | -[**post_minlength_validation_request_body**](PostApi.md#post_minlength_validation_request_body) | **POST** /requestBody/postMinlengthValidationRequestBody | -[**post_minproperties_validation_request_body**](PostApi.md#post_minproperties_validation_request_body) | **POST** /requestBody/postMinpropertiesValidationRequestBody | -[**post_nested_allof_to_check_validation_semantics_request_body**](PostApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -[**post_nested_anyof_to_check_validation_semantics_request_body**](PostApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -[**post_nested_items_request_body**](PostApi.md#post_nested_items_request_body) | **POST** /requestBody/postNestedItemsRequestBody | -[**post_nested_oneof_to_check_validation_semantics_request_body**](PostApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **POST** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -[**post_not_more_complex_schema_request_body**](PostApi.md#post_not_more_complex_schema_request_body) | **POST** /requestBody/postNotMoreComplexSchemaRequestBody | -[**post_not_request_body**](PostApi.md#post_not_request_body) | **POST** /requestBody/postNotRequestBody | -[**post_nul_characters_in_strings_request_body**](PostApi.md#post_nul_characters_in_strings_request_body) | **POST** /requestBody/postNulCharactersInStringsRequestBody | -[**post_null_type_matches_only_the_null_object_request_body**](PostApi.md#post_null_type_matches_only_the_null_object_request_body) | **POST** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -[**post_number_type_matches_numbers_request_body**](PostApi.md#post_number_type_matches_numbers_request_body) | **POST** /requestBody/postNumberTypeMatchesNumbersRequestBody | -[**post_object_properties_validation_request_body**](PostApi.md#post_object_properties_validation_request_body) | **POST** /requestBody/postObjectPropertiesValidationRequestBody | -[**post_object_type_matches_objects_request_body**](PostApi.md#post_object_type_matches_objects_request_body) | **POST** /requestBody/postObjectTypeMatchesObjectsRequestBody | -[**post_oneof_complex_types_request_body**](PostApi.md#post_oneof_complex_types_request_body) | **POST** /requestBody/postOneofComplexTypesRequestBody | -[**post_oneof_request_body**](PostApi.md#post_oneof_request_body) | **POST** /requestBody/postOneofRequestBody | -[**post_oneof_with_base_schema_request_body**](PostApi.md#post_oneof_with_base_schema_request_body) | **POST** /requestBody/postOneofWithBaseSchemaRequestBody | -[**post_oneof_with_empty_schema_request_body**](PostApi.md#post_oneof_with_empty_schema_request_body) | **POST** /requestBody/postOneofWithEmptySchemaRequestBody | -[**post_pattern_is_not_anchored_request_body**](PostApi.md#post_pattern_is_not_anchored_request_body) | **POST** /requestBody/postPatternIsNotAnchoredRequestBody | -[**post_pattern_validation_request_body**](PostApi.md#post_pattern_validation_request_body) | **POST** /requestBody/postPatternValidationRequestBody | -[**post_properties_with_escaped_characters_request_body**](PostApi.md#post_properties_with_escaped_characters_request_body) | **POST** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -[**post_property_named_ref_that_is_not_a_reference_request_body**](PostApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **POST** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -[**post_ref_in_additionalproperties_request_body**](PostApi.md#post_ref_in_additionalproperties_request_body) | **POST** /requestBody/postRefInAdditionalpropertiesRequestBody | -[**post_ref_in_allof_request_body**](PostApi.md#post_ref_in_allof_request_body) | **POST** /requestBody/postRefInAllofRequestBody | -[**post_ref_in_anyof_request_body**](PostApi.md#post_ref_in_anyof_request_body) | **POST** /requestBody/postRefInAnyofRequestBody | -[**post_ref_in_items_request_body**](PostApi.md#post_ref_in_items_request_body) | **POST** /requestBody/postRefInItemsRequestBody | -[**post_ref_in_oneof_request_body**](PostApi.md#post_ref_in_oneof_request_body) | **POST** /requestBody/postRefInOneofRequestBody | -[**post_ref_in_property_request_body**](PostApi.md#post_ref_in_property_request_body) | **POST** /requestBody/postRefInPropertyRequestBody | -[**post_required_default_validation_request_body**](PostApi.md#post_required_default_validation_request_body) | **POST** /requestBody/postRequiredDefaultValidationRequestBody | -[**post_required_validation_request_body**](PostApi.md#post_required_validation_request_body) | **POST** /requestBody/postRequiredValidationRequestBody | -[**post_required_with_empty_array_request_body**](PostApi.md#post_required_with_empty_array_request_body) | **POST** /requestBody/postRequiredWithEmptyArrayRequestBody | -[**post_simple_enum_validation_request_body**](PostApi.md#post_simple_enum_validation_request_body) | **POST** /requestBody/postSimpleEnumValidationRequestBody | -[**post_string_type_matches_strings_request_body**](PostApi.md#post_string_type_matches_strings_request_body) | **POST** /requestBody/postStringTypeMatchesStringsRequestBody | -[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](PostApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **POST** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -[**post_uniqueitems_false_validation_request_body**](PostApi.md#post_uniqueitems_false_validation_request_body) | **POST** /requestBody/postUniqueitemsFalseValidationRequestBody | -[**post_uniqueitems_validation_request_body**](PostApi.md#post_uniqueitems_validation_request_body) | **POST** /requestBody/postUniqueitemsValidationRequestBody | -[**post_uri_format_request_body**](PostApi.md#post_uri_format_request_body) | **POST** /requestBody/postUriFormatRequestBody | -[**post_uri_reference_format_request_body**](PostApi.md#post_uri_reference_format_request_body) | **POST** /requestBody/postUriReferenceFormatRequestBody | -[**post_uri_template_format_request_body**](PostApi.md#post_uri_template_format_request_body) | **POST** /requestBody/postUriTemplateFormatRequestBody | - -# **post_additionalproperties_allows_a_schema_which_should_validate_request_body** -> post_additionalproperties_allows_a_schema_which_should_validate_request_body(additionalproperties_allows_a_schema_which_should_validate) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAllowsASchemaWhichShouldValidate( - foo=None, - bar=None, - ) - try: - api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %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 -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 -------------- | ------------- | ------------- -[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_additionalproperties_are_allowed_by_default_request_body** -> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAreAllowedByDefault(None) - try: - api_response = api_instance.post_additionalproperties_are_allowed_by_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_additionalproperties_are_allowed_by_default_request_body: %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 -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 -------------- | ------------- | ------------- -[**AdditionalpropertiesAreAllowedByDefault**](AdditionalpropertiesAreAllowedByDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_additionalproperties_can_exist_by_itself_request_body** -> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesCanExistByItself( - key=True, - ) - try: - api_response = api_instance.post_additionalproperties_can_exist_by_itself_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_additionalproperties_can_exist_by_itself_request_body: %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 -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 -------------- | ------------- | ------------- -[**AdditionalpropertiesCanExistByItself**](AdditionalpropertiesCanExistByItself.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_additionalproperties_should_not_look_in_applicators_request_body** -> post_additionalproperties_should_not_look_in_applicators_request_body(additionalproperties_should_not_look_in_applicators) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesShouldNotLookInApplicators(None) - try: - api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_additionalproperties_should_not_look_in_applicators_request_body: %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 -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 -------------- | ------------- | ------------- -[**AdditionalpropertiesShouldNotLookInApplicators**](AdditionalpropertiesShouldNotLookInApplicators.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_combined_with_anyof_oneof_request_body** -> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofCombinedWithAnyofOneof(None) - try: - api_response = api_instance.post_allof_combined_with_anyof_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_allof_combined_with_anyof_oneof_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofCombinedWithAnyofOneof**](AllofCombinedWithAnyofOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_request_body** -> post_allof_request_body(allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.allof import Allof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = Allof(None) - try: - api_response = api_instance.post_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_allof_request_body: %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 -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 -------------- | ------------- | ------------- -[**Allof**](Allof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_simple_types_request_body** -> post_allof_simple_types_request_body(allof_simple_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofSimpleTypes(None) - try: - api_response = api_instance.post_allof_simple_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_allof_simple_types_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofSimpleTypes**](AllofSimpleTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_with_base_schema_request_body** -> post_allof_with_base_schema_request_body(allof_with_base_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithBaseSchema({}) - try: - api_response = api_instance.post_allof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_allof_with_base_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofWithBaseSchema**](AllofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_with_one_empty_schema_request_body** -> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithOneEmptySchema(None) - try: - api_response = api_instance.post_allof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_allof_with_one_empty_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofWithOneEmptySchema**](AllofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_with_the_first_empty_schema_request_body** -> post_allof_with_the_first_empty_schema_request_body(allof_with_the_first_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheFirstEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_first_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_allof_with_the_first_empty_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofWithTheFirstEmptySchema**](AllofWithTheFirstEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_with_the_last_empty_schema_request_body** -> post_allof_with_the_last_empty_schema_request_body(allof_with_the_last_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheLastEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_last_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_allof_with_the_last_empty_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofWithTheLastEmptySchema**](AllofWithTheLastEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_allof_with_two_empty_schemas_request_body** -> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTwoEmptySchemas(None) - try: - api_response = api_instance.post_allof_with_two_empty_schemas_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_allof_with_two_empty_schemas_request_body: %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 -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 -------------- | ------------- | ------------- -[**AllofWithTwoEmptySchemas**](AllofWithTwoEmptySchemas.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_anyof_complex_types_request_body** -> post_anyof_complex_types_request_body(anyof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofComplexTypes(None) - try: - api_response = api_instance.post_anyof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_anyof_complex_types_request_body: %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 -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 -------------- | ------------- | ------------- -[**AnyofComplexTypes**](AnyofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_anyof_request_body** -> post_anyof_request_body(anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.anyof import Anyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = Anyof(None) - try: - api_response = api_instance.post_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_anyof_request_body: %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 -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 -------------- | ------------- | ------------- -[**Anyof**](Anyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_anyof_with_base_schema_request_body** -> post_anyof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithBaseSchema("body_example") - try: - api_response = api_instance.post_anyof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_anyof_with_base_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AnyofWithBaseSchema**](AnyofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_anyof_with_one_empty_schema_request_body** -> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithOneEmptySchema(None) - try: - api_response = api_instance.post_anyof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_anyof_with_one_empty_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**AnyofWithOneEmptySchema**](AnyofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_array_type_matches_arrays_request_body** -> post_array_type_matches_arrays_request_body(array_type_matches_arrays) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = ArrayTypeMatchesArrays([ - None - ]) - try: - api_response = api_instance.post_array_type_matches_arrays_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_array_type_matches_arrays_request_body: %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 -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 -------------- | ------------- | ------------- -[**ArrayTypeMatchesArrays**](ArrayTypeMatchesArrays.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_boolean_type_matches_booleans_request_body** -> post_boolean_type_matches_booleans_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = True - try: - api_response = api_instance.post_boolean_type_matches_booleans_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_boolean_type_matches_booleans_request_body: %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 -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 -------------- | ------------- | ------------- -**bool** | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_by_int_request_body** -> post_by_int_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.by_int import ByInt -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = ByInt(None) - try: - api_response = api_instance.post_by_int_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_by_int_request_body: %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 -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 -------------- | ------------- | ------------- -[**ByInt**](ByInt.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_by_number_request_body** -> post_by_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.by_number import ByNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = ByNumber(None) - try: - api_response = api_instance.post_by_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_by_number_request_body: %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 -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 -------------- | ------------- | ------------- -[**ByNumber**](ByNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_by_small_number_request_body** -> post_by_small_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.by_small_number import BySmallNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = BySmallNumber(None) - try: - api_response = api_instance.post_by_small_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_by_small_number_request_body: %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 -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 -------------- | ------------- | ------------- -[**BySmallNumber**](BySmallNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_date_time_format_request_body** -> post_date_time_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_date_time_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_date_time_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_email_format_request_body** -> post_email_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_email_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_email_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enum_with0_does_not_match_false_request_body** -> post_enum_with0_does_not_match_false_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith0DoesNotMatchFalse(0) - try: - api_response = api_instance.post_enum_with0_does_not_match_false_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_enum_with0_does_not_match_false_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumWith0DoesNotMatchFalse**](EnumWith0DoesNotMatchFalse.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enum_with1_does_not_match_true_request_body** -> post_enum_with1_does_not_match_true_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith1DoesNotMatchTrue(1) - try: - api_response = api_instance.post_enum_with1_does_not_match_true_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_enum_with1_does_not_match_true_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumWith1DoesNotMatchTrue**](EnumWith1DoesNotMatchTrue.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enum_with_escaped_characters_request_body** -> post_enum_with_escaped_characters_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithEscapedCharacters("foo -bar") - try: - api_response = api_instance.post_enum_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_enum_with_escaped_characters_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumWithEscapedCharacters**](EnumWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enum_with_false_does_not_match0_request_body** -> post_enum_with_false_does_not_match0_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithFalseDoesNotMatch0(False) - try: - api_response = api_instance.post_enum_with_false_does_not_match0_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_enum_with_false_does_not_match0_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumWithFalseDoesNotMatch0**](EnumWithFalseDoesNotMatch0.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enum_with_true_does_not_match1_request_body** -> post_enum_with_true_does_not_match1_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithTrueDoesNotMatch1(True) - try: - api_response = api_instance.post_enum_with_true_does_not_match1_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_enum_with_true_does_not_match1_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumWithTrueDoesNotMatch1**](EnumWithTrueDoesNotMatch1.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_enums_in_properties_request_body** -> post_enums_in_properties_request_body(enums_in_properties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.enums_in_properties import EnumsInProperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumsInProperties( - foo="foo", - bar="bar", - ) - try: - api_response = api_instance.post_enums_in_properties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_enums_in_properties_request_body: %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 -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 -------------- | ------------- | ------------- -[**EnumsInProperties**](EnumsInProperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_forbidden_property_request_body** -> post_forbidden_property_request_body(forbidden_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.forbidden_property import ForbiddenProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = ForbiddenProperty(None) - try: - api_response = api_instance.post_forbidden_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_forbidden_property_request_body: %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 -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 -------------- | ------------- | ------------- -[**ForbiddenProperty**](ForbiddenProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_hostname_format_request_body** -> post_hostname_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_hostname_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_hostname_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_integer_type_matches_integers_request_body** -> post_integer_type_matches_integers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = 1 - try: - api_response = api_instance.post_integer_type_matches_integers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_integer_type_matches_integers_request_body: %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 -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 -------------- | ------------- | ------------- -**int** | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body** -> post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(1) - try: - api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %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 -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 -------------- | ------------- | ------------- -[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_invalid_string_value_for_default_request_body** -> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidStringValueForDefault(None) - try: - api_response = api_instance.post_invalid_string_value_for_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_invalid_string_value_for_default_request_body: %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 -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 -------------- | ------------- | ------------- -[**InvalidStringValueForDefault**](InvalidStringValueForDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ipv4_format_request_body** -> post_ipv4_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv4_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_ipv4_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ipv6_format_request_body** -> post_ipv6_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv6_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_ipv6_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_json_pointer_format_request_body** -> post_json_pointer_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_json_pointer_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_json_pointer_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maximum_validation_request_body** -> post_maximum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.maximum_validation import MaximumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidation(None) - try: - api_response = api_instance.post_maximum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_maximum_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MaximumValidation**](MaximumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maximum_validation_with_unsigned_integer_request_body** -> post_maximum_validation_with_unsigned_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidationWithUnsignedInteger(None) - try: - api_response = api_instance.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_maximum_validation_with_unsigned_integer_request_body: %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 -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 -------------- | ------------- | ------------- -[**MaximumValidationWithUnsignedInteger**](MaximumValidationWithUnsignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maxitems_validation_request_body** -> post_maxitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxitemsValidation(None) - try: - api_response = api_instance.post_maxitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_maxitems_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MaxitemsValidation**](MaxitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maxlength_validation_request_body** -> post_maxlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxlengthValidation(None) - try: - api_response = api_instance.post_maxlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_maxlength_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MaxlengthValidation**](MaxlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maxproperties0_means_the_object_is_empty_request_body** -> post_maxproperties0_means_the_object_is_empty_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = Maxproperties0MeansTheObjectIsEmpty(None) - try: - api_response = api_instance.post_maxproperties0_means_the_object_is_empty_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_maxproperties0_means_the_object_is_empty_request_body: %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 -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 -------------- | ------------- | ------------- -[**Maxproperties0MeansTheObjectIsEmpty**](Maxproperties0MeansTheObjectIsEmpty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_maxproperties_validation_request_body** -> post_maxproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxpropertiesValidation(None) - try: - api_response = api_instance.post_maxproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_maxproperties_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MaxpropertiesValidation**](MaxpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_minimum_validation_request_body** -> post_minimum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.minimum_validation import MinimumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidation(None) - try: - api_response = api_instance.post_minimum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_minimum_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MinimumValidation**](MinimumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_minimum_validation_with_signed_integer_request_body** -> post_minimum_validation_with_signed_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidationWithSignedInteger(None) - try: - api_response = api_instance.post_minimum_validation_with_signed_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_minimum_validation_with_signed_integer_request_body: %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 -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 -------------- | ------------- | ------------- -[**MinimumValidationWithSignedInteger**](MinimumValidationWithSignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_minitems_validation_request_body** -> post_minitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.minitems_validation import MinitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = MinitemsValidation(None) - try: - api_response = api_instance.post_minitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_minitems_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MinitemsValidation**](MinitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_minlength_validation_request_body** -> post_minlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.minlength_validation import MinlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = MinlengthValidation(None) - try: - api_response = api_instance.post_minlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_minlength_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MinlengthValidation**](MinlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_minproperties_validation_request_body** -> post_minproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = MinpropertiesValidation(None) - try: - api_response = api_instance.post_minproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_minproperties_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**MinpropertiesValidation**](MinpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_nested_allof_to_check_validation_semantics_request_body** -> post_nested_allof_to_check_validation_semantics_request_body(nested_allof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAllofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_allof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_nested_allof_to_check_validation_semantics_request_body: %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 -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 -------------- | ------------- | ------------- -[**NestedAllofToCheckValidationSemantics**](NestedAllofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_nested_anyof_to_check_validation_semantics_request_body** -> post_nested_anyof_to_check_validation_semantics_request_body(nested_anyof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAnyofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_anyof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_nested_anyof_to_check_validation_semantics_request_body: %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 -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 -------------- | ------------- | ------------- -[**NestedAnyofToCheckValidationSemantics**](NestedAnyofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_nested_items_request_body** -> post_nested_items_request_body(nested_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.nested_items import NestedItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedItems([ - [ - [ - [ - 3.14 - ] - ] - ] - ]) - try: - api_response = api_instance.post_nested_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_nested_items_request_body: %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 -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 -------------- | ------------- | ------------- -[**NestedItems**](NestedItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_nested_oneof_to_check_validation_semantics_request_body** -> post_nested_oneof_to_check_validation_semantics_request_body(nested_oneof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedOneofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_oneof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_nested_oneof_to_check_validation_semantics_request_body: %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 -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 -------------- | ------------- | ------------- -[**NestedOneofToCheckValidationSemantics**](NestedOneofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_not_more_complex_schema_request_body** -> post_not_more_complex_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_more_complex_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_not_more_complex_schema_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_not_request_body** -> post_not_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_not_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_nul_characters_in_strings_request_body** -> post_nul_characters_in_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = NulCharactersInStrings("hellothere") - try: - api_response = api_instance.post_nul_characters_in_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_nul_characters_in_strings_request_body: %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 -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 -------------- | ------------- | ------------- -[**NulCharactersInStrings**](NulCharactersInStrings.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_null_type_matches_only_the_null_object_request_body** -> post_null_type_matches_only_the_null_object_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_null_type_matches_only_the_null_object_request_body: %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 -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 -------------- | ------------- | ------------- -**none_type** | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_number_type_matches_numbers_request_body** -> post_number_type_matches_numbers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = 3.14 - try: - api_response = api_instance.post_number_type_matches_numbers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_number_type_matches_numbers_request_body: %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 -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 -------------- | ------------- | ------------- -**int, float** | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_object_properties_validation_request_body** -> post_object_properties_validation_request_body(object_properties_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = ObjectPropertiesValidation(None) - try: - api_response = api_instance.post_object_properties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_object_properties_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**ObjectPropertiesValidation**](ObjectPropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_object_type_matches_objects_request_body** -> post_object_type_matches_objects_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = dict() - try: - api_response = api_instance.post_object_type_matches_objects_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_object_type_matches_objects_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_oneof_complex_types_request_body** -> post_oneof_complex_types_request_body(oneof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofComplexTypes(None) - try: - api_response = api_instance.post_oneof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_oneof_complex_types_request_body: %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 -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 -------------- | ------------- | ------------- -[**OneofComplexTypes**](OneofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_oneof_request_body** -> post_oneof_request_body(oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.oneof import Oneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = Oneof(None) - try: - api_response = api_instance.post_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_oneof_request_body: %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 -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 -------------- | ------------- | ------------- -[**Oneof**](Oneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_oneof_with_base_schema_request_body** -> post_oneof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithBaseSchema("body_example") - try: - api_response = api_instance.post_oneof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_oneof_with_base_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**OneofWithBaseSchema**](OneofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_oneof_with_empty_schema_request_body** -> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithEmptySchema(None) - try: - api_response = api_instance.post_oneof_with_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_oneof_with_empty_schema_request_body: %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 -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 -------------- | ------------- | ------------- -[**OneofWithEmptySchema**](OneofWithEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_pattern_is_not_anchored_request_body** -> post_pattern_is_not_anchored_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternIsNotAnchored(None) - try: - api_response = api_instance.post_pattern_is_not_anchored_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_pattern_is_not_anchored_request_body: %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 -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 -------------- | ------------- | ------------- -[**PatternIsNotAnchored**](PatternIsNotAnchored.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_pattern_validation_request_body** -> post_pattern_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.pattern_validation import PatternValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternValidation(None) - try: - api_response = api_instance.post_pattern_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_pattern_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**PatternValidation**](PatternValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_properties_with_escaped_characters_request_body** -> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertiesWithEscapedCharacters(None) - try: - api_response = api_instance.post_properties_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_properties_with_escaped_characters_request_body: %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 -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 -------------- | ------------- | ------------- -[**PropertiesWithEscapedCharacters**](PropertiesWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_property_named_ref_that_is_not_a_reference_request_body** -> post_property_named_ref_that_is_not_a_reference_request_body(property_named_ref_that_is_not_a_reference) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertyNamedRefThatIsNotAReference(None) - try: - api_response = api_instance.post_property_named_ref_that_is_not_a_reference_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_property_named_ref_that_is_not_a_reference_request_body: %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 -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 -------------- | ------------- | ------------- -[**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_additionalproperties_request_body** -> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAdditionalproperties( - key=PropertyNamedRefThatIsNotAReference(None), - ) - try: - api_response = api_instance.post_ref_in_additionalproperties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_ref_in_additionalproperties_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInAdditionalproperties**](RefInAdditionalproperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_allof_request_body** -> post_ref_in_allof_request_body(ref_in_allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.ref_in_allof import RefInAllof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAllof(None) - try: - api_response = api_instance.post_ref_in_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_ref_in_allof_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInAllof**](RefInAllof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_anyof_request_body** -> post_ref_in_anyof_request_body(ref_in_anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.ref_in_anyof import RefInAnyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAnyof(None) - try: - api_response = api_instance.post_ref_in_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_ref_in_anyof_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInAnyof**](RefInAnyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_items_request_body** -> post_ref_in_items_request_body(ref_in_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.ref_in_items import RefInItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInItems([ - PropertyNamedRefThatIsNotAReference(None) - ]) - try: - api_response = api_instance.post_ref_in_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_ref_in_items_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInItems**](RefInItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_oneof_request_body** -> post_ref_in_oneof_request_body(ref_in_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.ref_in_oneof import RefInOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInOneof(None) - try: - api_response = api_instance.post_ref_in_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_ref_in_oneof_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInOneof**](RefInOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_ref_in_property_request_body** -> post_ref_in_property_request_body(ref_in_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.ref_in_property import RefInProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInProperty(None) - try: - api_response = api_instance.post_ref_in_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_ref_in_property_request_body: %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 -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 -------------- | ------------- | ------------- -[**RefInProperty**](RefInProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_required_default_validation_request_body** -> post_required_default_validation_request_body(required_default_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredDefaultValidation(None) - try: - api_response = api_instance.post_required_default_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_required_default_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**RequiredDefaultValidation**](RequiredDefaultValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_required_validation_request_body** -> post_required_validation_request_body(required_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.required_validation import RequiredValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredValidation(None) - try: - api_response = api_instance.post_required_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_required_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**RequiredValidation**](RequiredValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_required_with_empty_array_request_body** -> post_required_with_empty_array_request_body(required_with_empty_array) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredWithEmptyArray(None) - try: - api_response = api_instance.post_required_with_empty_array_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_required_with_empty_array_request_body: %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 -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 -------------- | ------------- | ------------- -[**RequiredWithEmptyArray**](RequiredWithEmptyArray.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_simple_enum_validation_request_body** -> post_simple_enum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = SimpleEnumValidation(1) - try: - api_response = api_instance.post_simple_enum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_simple_enum_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**SimpleEnumValidation**](SimpleEnumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_string_type_matches_strings_request_body** -> post_string_type_matches_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = "body_example" - try: - api_response = api_instance.post_string_type_matches_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_string_type_matches_strings_request_body: %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 -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 -------------- | ------------- | ------------- -**str** | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body** -> post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(the_default_keyword_does_not_do_anything_if_the_property_is_missing) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( - alpha=5, - ) - try: - api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %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 -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 -------------- | ------------- | ------------- -[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_uniqueitems_false_validation_request_body** -> post_uniqueitems_false_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsFalseValidation(None) - try: - api_response = api_instance.post_uniqueitems_false_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_uniqueitems_false_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**UniqueitemsFalseValidation**](UniqueitemsFalseValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_uniqueitems_validation_request_body** -> post_uniqueitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsValidation(None) - try: - api_response = api_instance.post_uniqueitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_uniqueitems_validation_request_body: %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 -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 -------------- | ------------- | ------------- -[**UniqueitemsValidation**](UniqueitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_uri_format_request_body** -> post_uri_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_uri_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_uri_reference_format_request_body** -> post_uri_reference_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_reference_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_uri_reference_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - -# **post_uri_template_format_request_body** -> post_uri_template_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.api import post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = post_api.PostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_template_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PostApi->post_uri_template_format_request_body: %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 -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 - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | ApiResponseFor200 | success - -#### ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - - -void (empty response body) - -### Authorization - -No authorization required - -[[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) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/ResponseContentContentTypeSchemaApi.md b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/ResponseContentContentTypeSchemaApi.md new file mode 100644 index 00000000000..15e5d81a23f --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/docs/ResponseContentContentTypeSchemaApi.md @@ -0,0 +1,5294 @@ +# unit_test_api.ResponseContentContentTypeSchemaApi + +All URIs are relative to *https://someserver.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | +[**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | +[**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | +[**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **POST** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | +[**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **POST** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | +[**post_allof_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_allof_response_body_for_content_types) | **POST** /responseBody/postAllofResponseBodyForContentTypes | +[**post_allof_simple_types_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_allof_simple_types_response_body_for_content_types) | **POST** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | +[**post_allof_with_base_schema_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_allof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | +[**post_allof_with_one_empty_schema_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_allof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | +[**post_allof_with_the_first_empty_schema_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | +[**post_allof_with_the_last_empty_schema_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | +[**post_allof_with_two_empty_schemas_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_allof_with_two_empty_schemas_response_body_for_content_types) | **POST** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | +[**post_anyof_complex_types_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_anyof_complex_types_response_body_for_content_types) | **POST** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | +[**post_anyof_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_anyof_response_body_for_content_types) | **POST** /responseBody/postAnyofResponseBodyForContentTypes | +[**post_anyof_with_base_schema_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_anyof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | +[**post_anyof_with_one_empty_schema_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_anyof_with_one_empty_schema_response_body_for_content_types) | **POST** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | +[**post_array_type_matches_arrays_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_array_type_matches_arrays_response_body_for_content_types) | **POST** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | +[**post_boolean_type_matches_booleans_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_boolean_type_matches_booleans_response_body_for_content_types) | **POST** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | +[**post_by_int_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_by_int_response_body_for_content_types) | **POST** /responseBody/postByIntResponseBodyForContentTypes | +[**post_by_number_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_by_number_response_body_for_content_types) | **POST** /responseBody/postByNumberResponseBodyForContentTypes | +[**post_by_small_number_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_by_small_number_response_body_for_content_types) | **POST** /responseBody/postBySmallNumberResponseBodyForContentTypes | +[**post_date_time_format_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_date_time_format_response_body_for_content_types) | **POST** /responseBody/postDateTimeFormatResponseBodyForContentTypes | +[**post_email_format_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_email_format_response_body_for_content_types) | **POST** /responseBody/postEmailFormatResponseBodyForContentTypes | +[**post_enum_with0_does_not_match_false_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_enum_with0_does_not_match_false_response_body_for_content_types) | **POST** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | +[**post_enum_with1_does_not_match_true_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_enum_with1_does_not_match_true_response_body_for_content_types) | **POST** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | +[**post_enum_with_escaped_characters_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_enum_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | +[**post_enum_with_false_does_not_match0_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_enum_with_false_does_not_match0_response_body_for_content_types) | **POST** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | +[**post_enum_with_true_does_not_match1_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_enum_with_true_does_not_match1_response_body_for_content_types) | **POST** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | +[**post_enums_in_properties_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_enums_in_properties_response_body_for_content_types) | **POST** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | +[**post_forbidden_property_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_forbidden_property_response_body_for_content_types) | **POST** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | +[**post_hostname_format_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_hostname_format_response_body_for_content_types) | **POST** /responseBody/postHostnameFormatResponseBodyForContentTypes | +[**post_integer_type_matches_integers_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_integer_type_matches_integers_response_body_for_content_types) | **POST** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | +[**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **POST** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | +[**post_invalid_string_value_for_default_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_invalid_string_value_for_default_response_body_for_content_types) | **POST** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | +[**post_ipv4_format_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_ipv4_format_response_body_for_content_types) | **POST** /responseBody/postIpv4FormatResponseBodyForContentTypes | +[**post_ipv6_format_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_ipv6_format_response_body_for_content_types) | **POST** /responseBody/postIpv6FormatResponseBodyForContentTypes | +[**post_json_pointer_format_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_json_pointer_format_response_body_for_content_types) | **POST** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | +[**post_maximum_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_maximum_validation_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationResponseBodyForContentTypes | +[**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **POST** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | +[**post_maxitems_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_maxitems_validation_response_body_for_content_types) | **POST** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | +[**post_maxlength_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_maxlength_validation_response_body_for_content_types) | **POST** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | +[**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **POST** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | +[**post_maxproperties_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_maxproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | +[**post_minimum_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_minimum_validation_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationResponseBodyForContentTypes | +[**post_minimum_validation_with_signed_integer_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **POST** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | +[**post_minitems_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_minitems_validation_response_body_for_content_types) | **POST** /responseBody/postMinitemsValidationResponseBodyForContentTypes | +[**post_minlength_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_minlength_validation_response_body_for_content_types) | **POST** /responseBody/postMinlengthValidationResponseBodyForContentTypes | +[**post_minproperties_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_minproperties_validation_response_body_for_content_types) | **POST** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | +[**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | +[**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | +[**post_nested_items_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_nested_items_response_body_for_content_types) | **POST** /responseBody/postNestedItemsResponseBodyForContentTypes | +[**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **POST** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | +[**post_not_more_complex_schema_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_not_more_complex_schema_response_body_for_content_types) | **POST** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | +[**post_not_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_not_response_body_for_content_types) | **POST** /responseBody/postNotResponseBodyForContentTypes | +[**post_nul_characters_in_strings_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_nul_characters_in_strings_response_body_for_content_types) | **POST** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | +[**post_null_type_matches_only_the_null_object_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **POST** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | +[**post_number_type_matches_numbers_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_number_type_matches_numbers_response_body_for_content_types) | **POST** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | +[**post_object_properties_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_object_properties_validation_response_body_for_content_types) | **POST** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | +[**post_object_type_matches_objects_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_object_type_matches_objects_response_body_for_content_types) | **POST** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | +[**post_oneof_complex_types_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_oneof_complex_types_response_body_for_content_types) | **POST** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | +[**post_oneof_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_oneof_response_body_for_content_types) | **POST** /responseBody/postOneofResponseBodyForContentTypes | +[**post_oneof_with_base_schema_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | +[**post_oneof_with_empty_schema_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **POST** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | +[**post_pattern_is_not_anchored_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **POST** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | +[**post_pattern_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_pattern_validation_response_body_for_content_types) | **POST** /responseBody/postPatternValidationResponseBodyForContentTypes | +[**post_properties_with_escaped_characters_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_properties_with_escaped_characters_response_body_for_content_types) | **POST** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | +[**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **POST** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | +[**post_ref_in_additionalproperties_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_ref_in_additionalproperties_response_body_for_content_types) | **POST** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | +[**post_ref_in_allof_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_ref_in_allof_response_body_for_content_types) | **POST** /responseBody/postRefInAllofResponseBodyForContentTypes | +[**post_ref_in_anyof_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_ref_in_anyof_response_body_for_content_types) | **POST** /responseBody/postRefInAnyofResponseBodyForContentTypes | +[**post_ref_in_items_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_ref_in_items_response_body_for_content_types) | **POST** /responseBody/postRefInItemsResponseBodyForContentTypes | +[**post_ref_in_oneof_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_ref_in_oneof_response_body_for_content_types) | **POST** /responseBody/postRefInOneofResponseBodyForContentTypes | +[**post_ref_in_property_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_ref_in_property_response_body_for_content_types) | **POST** /responseBody/postRefInPropertyResponseBodyForContentTypes | +[**post_required_default_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_required_default_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | +[**post_required_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_required_validation_response_body_for_content_types) | **POST** /responseBody/postRequiredValidationResponseBodyForContentTypes | +[**post_required_with_empty_array_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_required_with_empty_array_response_body_for_content_types) | **POST** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | +[**post_simple_enum_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_simple_enum_validation_response_body_for_content_types) | **POST** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | +[**post_string_type_matches_strings_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_string_type_matches_strings_response_body_for_content_types) | **POST** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | +[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **POST** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | +[**post_uniqueitems_false_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_uniqueitems_false_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | +[**post_uniqueitems_validation_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_uniqueitems_validation_response_body_for_content_types) | **POST** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | +[**post_uri_format_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_uri_format_response_body_for_content_types) | **POST** /responseBody/postUriFormatResponseBodyForContentTypes | +[**post_uri_reference_format_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_uri_reference_format_response_body_for_content_types) | **POST** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | +[**post_uri_template_format_response_body_for_content_types**](ResponseContentContentTypeSchemaApi.md#post_uri_template_format_response_body_for_content_types) | **POST** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | + +# **post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types** +> AdditionalpropertiesAllowsASchemaWhichShouldValidate post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | + + + +[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_are_allowed_by_default_response_body_for_content_types** +> AdditionalpropertiesAreAllowedByDefault post_additionalproperties_are_allowed_by_default_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_are_allowed_by_default_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_additionalproperties_are_allowed_by_default_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesAreAllowedByDefault**](AdditionalpropertiesAreAllowedByDefault.md) | | + + + +[**AdditionalpropertiesAreAllowedByDefault**](AdditionalpropertiesAreAllowedByDefault.md) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_can_exist_by_itself_response_body_for_content_types** +> AdditionalpropertiesCanExistByItself post_additionalproperties_can_exist_by_itself_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_can_exist_by_itself_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_additionalproperties_can_exist_by_itself_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesCanExistByItself**](AdditionalpropertiesCanExistByItself.md) | | + + + +[**AdditionalpropertiesCanExistByItself**](AdditionalpropertiesCanExistByItself.md) + +### Authorization + +No authorization required + +[[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) + +# **post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types** +> AdditionalpropertiesShouldNotLookInApplicators post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalpropertiesShouldNotLookInApplicators**](AdditionalpropertiesShouldNotLookInApplicators.md) | | + + + +[**AdditionalpropertiesShouldNotLookInApplicators**](AdditionalpropertiesShouldNotLookInApplicators.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_combined_with_anyof_oneof_response_body_for_content_types** +> AllofCombinedWithAnyofOneof post_allof_combined_with_anyof_oneof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_combined_with_anyof_oneof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_combined_with_anyof_oneof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofCombinedWithAnyofOneof**](AllofCombinedWithAnyofOneof.md) | | + + + +[**AllofCombinedWithAnyofOneof**](AllofCombinedWithAnyofOneof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_response_body_for_content_types** +> Allof post_allof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.allof import Allof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Allof**](Allof.md) | | + + + +[**Allof**](Allof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_simple_types_response_body_for_content_types** +> AllofSimpleTypes post_allof_simple_types_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.allof_simple_types import AllofSimpleTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_simple_types_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_simple_types_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofSimpleTypes**](AllofSimpleTypes.md) | | + + + +[**AllofSimpleTypes**](AllofSimpleTypes.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_base_schema_response_body_for_content_types** +> AllofWithBaseSchema post_allof_with_base_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_base_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_with_base_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithBaseSchema**](AllofWithBaseSchema.md) | | + + + +[**AllofWithBaseSchema**](AllofWithBaseSchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_one_empty_schema_response_body_for_content_types** +> AllofWithOneEmptySchema post_allof_with_one_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_one_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_with_one_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithOneEmptySchema**](AllofWithOneEmptySchema.md) | | + + + +[**AllofWithOneEmptySchema**](AllofWithOneEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_the_first_empty_schema_response_body_for_content_types** +> AllofWithTheFirstEmptySchema post_allof_with_the_first_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_the_first_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_with_the_first_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithTheFirstEmptySchema**](AllofWithTheFirstEmptySchema.md) | | + + + +[**AllofWithTheFirstEmptySchema**](AllofWithTheFirstEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_the_last_empty_schema_response_body_for_content_types** +> AllofWithTheLastEmptySchema post_allof_with_the_last_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_the_last_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_with_the_last_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithTheLastEmptySchema**](AllofWithTheLastEmptySchema.md) | | + + + +[**AllofWithTheLastEmptySchema**](AllofWithTheLastEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_allof_with_two_empty_schemas_response_body_for_content_types** +> AllofWithTwoEmptySchemas post_allof_with_two_empty_schemas_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_allof_with_two_empty_schemas_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_with_two_empty_schemas_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AllofWithTwoEmptySchemas**](AllofWithTwoEmptySchemas.md) | | + + + +[**AllofWithTwoEmptySchemas**](AllofWithTwoEmptySchemas.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_complex_types_response_body_for_content_types** +> AnyofComplexTypes post_anyof_complex_types_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.anyof_complex_types import AnyofComplexTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_complex_types_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_anyof_complex_types_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AnyofComplexTypes**](AnyofComplexTypes.md) | | + + + +[**AnyofComplexTypes**](AnyofComplexTypes.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_response_body_for_content_types** +> Anyof post_anyof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.anyof import Anyof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_anyof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Anyof**](Anyof.md) | | + + + +[**Anyof**](Anyof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_with_base_schema_response_body_for_content_types** +> AnyofWithBaseSchema post_anyof_with_base_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_with_base_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_anyof_with_base_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AnyofWithBaseSchema**](AnyofWithBaseSchema.md) | | + + + +[**AnyofWithBaseSchema**](AnyofWithBaseSchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_anyof_with_one_empty_schema_response_body_for_content_types** +> AnyofWithOneEmptySchema post_anyof_with_one_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_anyof_with_one_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_anyof_with_one_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AnyofWithOneEmptySchema**](AnyofWithOneEmptySchema.md) | | + + + +[**AnyofWithOneEmptySchema**](AnyofWithOneEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_array_type_matches_arrays_response_body_for_content_types** +> ArrayTypeMatchesArrays post_array_type_matches_arrays_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_array_type_matches_arrays_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_array_type_matches_arrays_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArrayTypeMatchesArrays**](ArrayTypeMatchesArrays.md) | | + + + +[**ArrayTypeMatchesArrays**](ArrayTypeMatchesArrays.md) + +### Authorization + +No authorization required + +[[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) + +# **post_boolean_type_matches_booleans_response_body_for_content_types** +> bool post_boolean_type_matches_booleans_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_boolean_type_matches_booleans_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_boolean_type_matches_booleans_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**bool** | | + + +**bool** + +### Authorization + +No authorization required + +[[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) + +# **post_by_int_response_body_for_content_types** +> ByInt post_by_int_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.by_int import ByInt +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_by_int_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_by_int_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ByInt**](ByInt.md) | | + + + +[**ByInt**](ByInt.md) + +### Authorization + +No authorization required + +[[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) + +# **post_by_number_response_body_for_content_types** +> ByNumber post_by_number_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.by_number import ByNumber +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_by_number_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_by_number_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ByNumber**](ByNumber.md) | | + + + +[**ByNumber**](ByNumber.md) + +### Authorization + +No authorization required + +[[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) + +# **post_by_small_number_response_body_for_content_types** +> BySmallNumber post_by_small_number_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.by_small_number import BySmallNumber +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_by_small_number_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_by_small_number_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**BySmallNumber**](BySmallNumber.md) | | + + + +[**BySmallNumber**](BySmallNumber.md) + +### Authorization + +No authorization required + +[[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) + +# **post_date_time_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_date_time_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_date_time_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_date_time_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_email_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_email_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_email_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_email_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with0_does_not_match_false_response_body_for_content_types** +> EnumWith0DoesNotMatchFalse post_enum_with0_does_not_match_false_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with0_does_not_match_false_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_enum_with0_does_not_match_false_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWith0DoesNotMatchFalse**](EnumWith0DoesNotMatchFalse.md) | | + + + +[**EnumWith0DoesNotMatchFalse**](EnumWith0DoesNotMatchFalse.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with1_does_not_match_true_response_body_for_content_types** +> EnumWith1DoesNotMatchTrue post_enum_with1_does_not_match_true_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with1_does_not_match_true_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_enum_with1_does_not_match_true_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWith1DoesNotMatchTrue**](EnumWith1DoesNotMatchTrue.md) | | + + + +[**EnumWith1DoesNotMatchTrue**](EnumWith1DoesNotMatchTrue.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_escaped_characters_response_body_for_content_types** +> EnumWithEscapedCharacters post_enum_with_escaped_characters_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with_escaped_characters_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_enum_with_escaped_characters_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWithEscapedCharacters**](EnumWithEscapedCharacters.md) | | + + + +[**EnumWithEscapedCharacters**](EnumWithEscapedCharacters.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_false_does_not_match0_response_body_for_content_types** +> EnumWithFalseDoesNotMatch0 post_enum_with_false_does_not_match0_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with_false_does_not_match0_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_enum_with_false_does_not_match0_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWithFalseDoesNotMatch0**](EnumWithFalseDoesNotMatch0.md) | | + + + +[**EnumWithFalseDoesNotMatch0**](EnumWithFalseDoesNotMatch0.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enum_with_true_does_not_match1_response_body_for_content_types** +> EnumWithTrueDoesNotMatch1 post_enum_with_true_does_not_match1_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enum_with_true_does_not_match1_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_enum_with_true_does_not_match1_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumWithTrueDoesNotMatch1**](EnumWithTrueDoesNotMatch1.md) | | + + + +[**EnumWithTrueDoesNotMatch1**](EnumWithTrueDoesNotMatch1.md) + +### Authorization + +No authorization required + +[[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) + +# **post_enums_in_properties_response_body_for_content_types** +> EnumsInProperties post_enums_in_properties_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.enums_in_properties import EnumsInProperties +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_enums_in_properties_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_enums_in_properties_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EnumsInProperties**](EnumsInProperties.md) | | + + + +[**EnumsInProperties**](EnumsInProperties.md) + +### Authorization + +No authorization required + +[[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) + +# **post_forbidden_property_response_body_for_content_types** +> ForbiddenProperty post_forbidden_property_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.forbidden_property import ForbiddenProperty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_forbidden_property_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_forbidden_property_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ForbiddenProperty**](ForbiddenProperty.md) | | + + + +[**ForbiddenProperty**](ForbiddenProperty.md) + +### Authorization + +No authorization required + +[[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) + +# **post_hostname_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_hostname_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_hostname_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_hostname_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_integer_type_matches_integers_response_body_for_content_types** +> int post_integer_type_matches_integers_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_integer_type_matches_integers_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_integer_type_matches_integers_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + + +**int** + +### Authorization + +No authorization required + +[[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) + +# **post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types** +> InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | + + + +[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) + +### Authorization + +No authorization required + +[[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) + +# **post_invalid_string_value_for_default_response_body_for_content_types** +> InvalidStringValueForDefault post_invalid_string_value_for_default_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_invalid_string_value_for_default_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_invalid_string_value_for_default_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**InvalidStringValueForDefault**](InvalidStringValueForDefault.md) | | + + + +[**InvalidStringValueForDefault**](InvalidStringValueForDefault.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ipv4_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_ipv4_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ipv4_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_ipv4_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_ipv6_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_ipv6_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ipv6_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_ipv6_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_json_pointer_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_json_pointer_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_json_pointer_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_json_pointer_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_maximum_validation_response_body_for_content_types** +> MaximumValidation post_maximum_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.maximum_validation import MaximumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maximum_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_maximum_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaximumValidation**](MaximumValidation.md) | | + + + +[**MaximumValidation**](MaximumValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maximum_validation_with_unsigned_integer_response_body_for_content_types** +> MaximumValidationWithUnsignedInteger post_maximum_validation_with_unsigned_integer_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maximum_validation_with_unsigned_integer_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_maximum_validation_with_unsigned_integer_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaximumValidationWithUnsignedInteger**](MaximumValidationWithUnsignedInteger.md) | | + + + +[**MaximumValidationWithUnsignedInteger**](MaximumValidationWithUnsignedInteger.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxitems_validation_response_body_for_content_types** +> MaxitemsValidation post_maxitems_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.maxitems_validation import MaxitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxitems_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_maxitems_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaxitemsValidation**](MaxitemsValidation.md) | | + + + +[**MaxitemsValidation**](MaxitemsValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxlength_validation_response_body_for_content_types** +> MaxlengthValidation post_maxlength_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.maxlength_validation import MaxlengthValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxlength_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_maxlength_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaxlengthValidation**](MaxlengthValidation.md) | | + + + +[**MaxlengthValidation**](MaxlengthValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxproperties0_means_the_object_is_empty_response_body_for_content_types** +> Maxproperties0MeansTheObjectIsEmpty post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_maxproperties0_means_the_object_is_empty_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Maxproperties0MeansTheObjectIsEmpty**](Maxproperties0MeansTheObjectIsEmpty.md) | | + + + +[**Maxproperties0MeansTheObjectIsEmpty**](Maxproperties0MeansTheObjectIsEmpty.md) + +### Authorization + +No authorization required + +[[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) + +# **post_maxproperties_validation_response_body_for_content_types** +> MaxpropertiesValidation post_maxproperties_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_maxproperties_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_maxproperties_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MaxpropertiesValidation**](MaxpropertiesValidation.md) | | + + + +[**MaxpropertiesValidation**](MaxpropertiesValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minimum_validation_response_body_for_content_types** +> MinimumValidation post_minimum_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.minimum_validation import MinimumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minimum_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_minimum_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinimumValidation**](MinimumValidation.md) | | + + + +[**MinimumValidation**](MinimumValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minimum_validation_with_signed_integer_response_body_for_content_types** +> MinimumValidationWithSignedInteger post_minimum_validation_with_signed_integer_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minimum_validation_with_signed_integer_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_minimum_validation_with_signed_integer_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinimumValidationWithSignedInteger**](MinimumValidationWithSignedInteger.md) | | + + + +[**MinimumValidationWithSignedInteger**](MinimumValidationWithSignedInteger.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minitems_validation_response_body_for_content_types** +> MinitemsValidation post_minitems_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.minitems_validation import MinitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minitems_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_minitems_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinitemsValidation**](MinitemsValidation.md) | | + + + +[**MinitemsValidation**](MinitemsValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minlength_validation_response_body_for_content_types** +> MinlengthValidation post_minlength_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.minlength_validation import MinlengthValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minlength_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_minlength_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinlengthValidation**](MinlengthValidation.md) | | + + + +[**MinlengthValidation**](MinlengthValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_minproperties_validation_response_body_for_content_types** +> MinpropertiesValidation post_minproperties_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.minproperties_validation import MinpropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_minproperties_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_minproperties_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MinpropertiesValidation**](MinpropertiesValidation.md) | | + + + +[**MinpropertiesValidation**](MinpropertiesValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_allof_to_check_validation_semantics_response_body_for_content_types** +> NestedAllofToCheckValidationSemantics post_nested_allof_to_check_validation_semantics_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_allof_to_check_validation_semantics_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_nested_allof_to_check_validation_semantics_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedAllofToCheckValidationSemantics**](NestedAllofToCheckValidationSemantics.md) | | + + + +[**NestedAllofToCheckValidationSemantics**](NestedAllofToCheckValidationSemantics.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_anyof_to_check_validation_semantics_response_body_for_content_types** +> NestedAnyofToCheckValidationSemantics post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_nested_anyof_to_check_validation_semantics_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedAnyofToCheckValidationSemantics**](NestedAnyofToCheckValidationSemantics.md) | | + + + +[**NestedAnyofToCheckValidationSemantics**](NestedAnyofToCheckValidationSemantics.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_items_response_body_for_content_types** +> NestedItems post_nested_items_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.nested_items import NestedItems +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_items_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_nested_items_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedItems**](NestedItems.md) | | + + + +[**NestedItems**](NestedItems.md) + +### Authorization + +No authorization required + +[[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) + +# **post_nested_oneof_to_check_validation_semantics_response_body_for_content_types** +> NestedOneofToCheckValidationSemantics post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_nested_oneof_to_check_validation_semantics_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NestedOneofToCheckValidationSemantics**](NestedOneofToCheckValidationSemantics.md) | | + + + +[**NestedOneofToCheckValidationSemantics**](NestedOneofToCheckValidationSemantics.md) + +### Authorization + +No authorization required + +[[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) + +# **post_not_more_complex_schema_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_not_more_complex_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_not_more_complex_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_not_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_not_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_not_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_not_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_nul_characters_in_strings_response_body_for_content_types** +> NulCharactersInStrings post_nul_characters_in_strings_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_nul_characters_in_strings_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_nul_characters_in_strings_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NulCharactersInStrings**](NulCharactersInStrings.md) | | + + + +[**NulCharactersInStrings**](NulCharactersInStrings.md) + +### Authorization + +No authorization required + +[[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) + +# **post_null_type_matches_only_the_null_object_response_body_for_content_types** +> none_type post_null_type_matches_only_the_null_object_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_null_type_matches_only_the_null_object_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_null_type_matches_only_the_null_object_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**none_type** | | + + +**none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_number_type_matches_numbers_response_body_for_content_types** +> int, float post_number_type_matches_numbers_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_number_type_matches_numbers_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_number_type_matches_numbers_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**int, float** | | + + +**int, float** + +### Authorization + +No authorization required + +[[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) + +# **post_object_properties_validation_response_body_for_content_types** +> ObjectPropertiesValidation post_object_properties_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_object_properties_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_object_properties_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectPropertiesValidation**](ObjectPropertiesValidation.md) | | + + + +[**ObjectPropertiesValidation**](ObjectPropertiesValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_object_type_matches_objects_response_body_for_content_types** +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} post_object_type_matches_objects_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_object_type_matches_objects_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_object_type_matches_objects_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_oneof_complex_types_response_body_for_content_types** +> OneofComplexTypes post_oneof_complex_types_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.oneof_complex_types import OneofComplexTypes +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_complex_types_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_oneof_complex_types_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OneofComplexTypes**](OneofComplexTypes.md) | | + + + +[**OneofComplexTypes**](OneofComplexTypes.md) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_response_body_for_content_types** +> Oneof post_oneof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.oneof import Oneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_oneof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Oneof**](Oneof.md) | | + + + +[**Oneof**](Oneof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_with_base_schema_response_body_for_content_types** +> OneofWithBaseSchema post_oneof_with_base_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_with_base_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_oneof_with_base_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OneofWithBaseSchema**](OneofWithBaseSchema.md) | | + + + +[**OneofWithBaseSchema**](OneofWithBaseSchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_oneof_with_empty_schema_response_body_for_content_types** +> OneofWithEmptySchema post_oneof_with_empty_schema_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_oneof_with_empty_schema_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_oneof_with_empty_schema_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OneofWithEmptySchema**](OneofWithEmptySchema.md) | | + + + +[**OneofWithEmptySchema**](OneofWithEmptySchema.md) + +### Authorization + +No authorization required + +[[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) + +# **post_pattern_is_not_anchored_response_body_for_content_types** +> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_pattern_is_not_anchored_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_pattern_is_not_anchored_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PatternIsNotAnchored**](PatternIsNotAnchored.md) | | + + + +[**PatternIsNotAnchored**](PatternIsNotAnchored.md) + +### Authorization + +No authorization required + +[[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) + +# **post_pattern_validation_response_body_for_content_types** +> PatternValidation post_pattern_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.pattern_validation import PatternValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_pattern_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_pattern_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PatternValidation**](PatternValidation.md) | | + + + +[**PatternValidation**](PatternValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_properties_with_escaped_characters_response_body_for_content_types** +> PropertiesWithEscapedCharacters post_properties_with_escaped_characters_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_properties_with_escaped_characters_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_properties_with_escaped_characters_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PropertiesWithEscapedCharacters**](PropertiesWithEscapedCharacters.md) | | + + + +[**PropertiesWithEscapedCharacters**](PropertiesWithEscapedCharacters.md) + +### Authorization + +No authorization required + +[[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) + +# **post_property_named_ref_that_is_not_a_reference_response_body_for_content_types** +> PropertyNamedRefThatIsNotAReference post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_property_named_ref_that_is_not_a_reference_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | + + + +[**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_additionalproperties_response_body_for_content_types** +> RefInAdditionalproperties post_ref_in_additionalproperties_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_additionalproperties_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_additionalproperties_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInAdditionalproperties**](RefInAdditionalproperties.md) | | + + + +[**RefInAdditionalproperties**](RefInAdditionalproperties.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_allof_response_body_for_content_types** +> RefInAllof post_ref_in_allof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.ref_in_allof import RefInAllof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_allof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_allof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInAllof**](RefInAllof.md) | | + + + +[**RefInAllof**](RefInAllof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_anyof_response_body_for_content_types** +> RefInAnyof post_ref_in_anyof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.ref_in_anyof import RefInAnyof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_anyof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_anyof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInAnyof**](RefInAnyof.md) | | + + + +[**RefInAnyof**](RefInAnyof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_items_response_body_for_content_types** +> RefInItems post_ref_in_items_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.ref_in_items import RefInItems +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_items_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_items_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInItems**](RefInItems.md) | | + + + +[**RefInItems**](RefInItems.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_oneof_response_body_for_content_types** +> RefInOneof post_ref_in_oneof_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.ref_in_oneof import RefInOneof +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_oneof_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_oneof_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInOneof**](RefInOneof.md) | | + + + +[**RefInOneof**](RefInOneof.md) + +### Authorization + +No authorization required + +[[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) + +# **post_ref_in_property_response_body_for_content_types** +> RefInProperty post_ref_in_property_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.ref_in_property import RefInProperty +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_ref_in_property_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_property_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RefInProperty**](RefInProperty.md) | | + + + +[**RefInProperty**](RefInProperty.md) + +### Authorization + +No authorization required + +[[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) + +# **post_required_default_validation_response_body_for_content_types** +> RequiredDefaultValidation post_required_default_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.required_default_validation import RequiredDefaultValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_required_default_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_required_default_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredDefaultValidation**](RequiredDefaultValidation.md) | | + + + +[**RequiredDefaultValidation**](RequiredDefaultValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_required_validation_response_body_for_content_types** +> RequiredValidation post_required_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.required_validation import RequiredValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_required_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_required_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredValidation**](RequiredValidation.md) | | + + + +[**RequiredValidation**](RequiredValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_required_with_empty_array_response_body_for_content_types** +> RequiredWithEmptyArray post_required_with_empty_array_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_required_with_empty_array_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_required_with_empty_array_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**RequiredWithEmptyArray**](RequiredWithEmptyArray.md) | | + + + +[**RequiredWithEmptyArray**](RequiredWithEmptyArray.md) + +### Authorization + +No authorization required + +[[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) + +# **post_simple_enum_validation_response_body_for_content_types** +> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.simple_enum_validation import SimpleEnumValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_simple_enum_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_simple_enum_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**SimpleEnumValidation**](SimpleEnumValidation.md) | | + + + +[**SimpleEnumValidation**](SimpleEnumValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_string_type_matches_strings_response_body_for_content_types** +> str post_string_type_matches_strings_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_string_type_matches_strings_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_string_type_matches_strings_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + + +**str** + +### Authorization + +No authorization required + +[[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) + +# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types** +> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | + + + +[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) + +### Authorization + +No authorization required + +[[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) + +# **post_uniqueitems_false_validation_response_body_for_content_types** +> UniqueitemsFalseValidation post_uniqueitems_false_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uniqueitems_false_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_uniqueitems_false_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UniqueitemsFalseValidation**](UniqueitemsFalseValidation.md) | | + + + +[**UniqueitemsFalseValidation**](UniqueitemsFalseValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_uniqueitems_validation_response_body_for_content_types** +> UniqueitemsValidation post_uniqueitems_validation_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uniqueitems_validation_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_uniqueitems_validation_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UniqueitemsValidation**](UniqueitemsValidation.md) | | + + + +[**UniqueitemsValidation**](UniqueitemsValidation.md) + +### Authorization + +No authorization required + +[[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) + +# **post_uri_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_uri_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uri_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_uri_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_uri_reference_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_uri_reference_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uri_reference_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_uri_reference_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + +# **post_uri_template_format_response_body_for_content_types** +> bool, date, datetime, dict, float, int, list, str, none_type post_uri_template_format_response_body_for_content_types() + + + +### Example + +```python +import unit_test_api +from unit_test_api.api import response_content_content_type_schema_api +from pprint import pprint +# Defining the host is optional and defaults to https://someserver.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = unit_test_api.Configuration( + host = "https://someserver.com/v1" +) + +# Enter a context with an instance of the API client +with unit_test_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.post_uri_template_format_response_body_for_content_types() + pprint(api_response) + except unit_test_api.ApiException as e: + print("Exception when calling ResponseContentContentTypeSchemaApi->post_uri_template_format_response_body_for_content_types: %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 +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +No authorization required + +[[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) + diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/__init__.py index 2d2e1b5c730..3d592080805 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/__init__.py @@ -16,8 +16,8 @@ class ApiTestMixin: url: str, method: str = 'POST', body: typing.Optional[bytes] = None, - content_type: typing.Optional[str] = 'application/json', - accept_content_type: typing.Optional[str] = 'application/json', + content_type: typing.Optional[str] = None, + accept_content_type: typing.Optional[str] = None, stream: bool = False, ): headers = { diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_additionalproperties_should_not_look_in_applicators.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_additionalproperties_should_not_look_in_applicators.py index f296b2ad621..a85e54f74ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_additionalproperties_should_not_look_in_applicators.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_additionalproperties_should_not_look_in_applicators.py @@ -33,6 +33,18 @@ class TestAdditionalpropertiesShouldNotLookInApplicators(unittest.TestCase): _configuration=self._configuration ) + def test_valid_test_case_passes(self): + # valid test case + AdditionalpropertiesShouldNotLookInApplicators._from_openapi_data( + { + "foo": + False, + "bar": + True, + }, + _configuration=self._configuration + ) + if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_content_type_json_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_content_type_json_api.py new file mode 100644 index 00000000000..afd4fd61b1a --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_content_type_json_api.py @@ -0,0 +1,20900 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + + The version of the OpenAPI document: 0.0.1 + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import unit_test_api +from unit_test_api.api.content_type_json_api import ContentTypeJsonApi # noqa: E501 +from unit_test_api import configuration, schemas, api_client + +from . import ApiTestMixin + + +class TestContentTypeJsonApi(ApiTestMixin, unittest.TestCase): + """ContentTypeJsonApi unit test stubs""" + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = ContentTypeJsonApi(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + def test_post_additionalproperties_allows_a_schema_which_should_validate_request_body(self): + """Test case for post_additionalproperties_allows_a_schema_which_should_validate_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_additionalproperties_allows_a_schema_which_should_validate_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_no_additional_properties_is_valid_passes + # no additional properties is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_additional_invalid_property_is_invalid_fails + # an additional invalid property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + 12, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body(body=body) + + # test_an_additional_valid_property_is_valid_passes + # an additional valid property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + True, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types(self): + """Test case for post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_no_additional_properties_is_valid_passes + # no additional properties is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_additional_invalid_property_is_invalid_fails + # an additional invalid property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + 12, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_additional_valid_property_is_valid_passes + # an additional valid property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_additionalproperties_are_allowed_by_default_request_body(self): + """Test case for post_additionalproperties_are_allowed_by_default_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_additionalproperties_are_allowed_by_default_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_additional_properties_are_allowed_passes + # additional properties are allowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + True, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_additionalproperties_are_allowed_by_default_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_additionalproperties_are_allowed_by_default_response_body_for_content_types(self): + """Test case for post_additionalproperties_are_allowed_by_default_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_additionalproperties_are_allowed_by_default_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_additional_properties_are_allowed_passes + # additional properties are allowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_additionalproperties_can_exist_by_itself_request_body(self): + """Test case for post_additionalproperties_can_exist_by_itself_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_additionalproperties_can_exist_by_itself_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_an_additional_invalid_property_is_invalid_fails + # an additional invalid property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_additionalproperties_can_exist_by_itself_request_body(body=body) + + # test_an_additional_valid_property_is_valid_passes + # an additional valid property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + True, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_additionalproperties_can_exist_by_itself_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_additionalproperties_can_exist_by_itself_response_body_for_content_types(self): + """Test case for post_additionalproperties_can_exist_by_itself_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_additionalproperties_can_exist_by_itself_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_additional_invalid_property_is_invalid_fails + # an additional invalid property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_additional_valid_property_is_valid_passes + # an additional valid property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_additionalproperties_should_not_look_in_applicators_request_body(self): + """Test case for post_additionalproperties_should_not_look_in_applicators_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_additionalproperties_should_not_look_in_applicators_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_properties_defined_in_allof_are_not_examined_fails + # properties defined in allOf are not examined + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + True, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_additionalproperties_should_not_look_in_applicators_request_body(body=body) + + # test_valid_test_case_passes + # valid test case + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + False, + "bar": + True, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_additionalproperties_should_not_look_in_applicators_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types(self): + """Test case for post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_properties_defined_in_allof_are_not_examined_fails + # properties defined in allOf are not examined + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_valid_test_case_passes + # valid test case + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + False, + "bar": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_combined_with_anyof_oneof_request_body(self): + """Test case for post_allof_combined_with_anyof_oneof_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_combined_with_anyof_oneof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_allof_true_anyof_false_oneof_false_fails + # allOf: true, anyOf: false, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_false_anyof_false_oneof_true_fails + # allOf: false, anyOf: false, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 5 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_false_anyof_true_oneof_true_fails + # allOf: false, anyOf: true, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 15 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_true_anyof_true_oneof_false_fails + # allOf: true, anyOf: true, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 6 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_true_anyof_true_oneof_true_passes + # allOf: true, anyOf: true, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 30 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_combined_with_anyof_oneof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofCombinedWithAnyofOneofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_allof_true_anyof_false_oneof_true_fails + # allOf: true, anyOf: false, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 10 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_false_anyof_true_oneof_false_fails + # allOf: false, anyOf: true, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_false_anyof_false_oneof_false_fails + # allOf: false, anyOf: false, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + + + def test_post_allof_combined_with_anyof_oneof_response_body_for_content_types(self): + """Test case for post_allof_combined_with_anyof_oneof_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_combined_with_anyof_oneof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_allof_true_anyof_false_oneof_false_fails + # allOf: true, anyOf: false, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_false_oneof_true_fails + # allOf: false, anyOf: false, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_true_oneof_true_fails + # allOf: false, anyOf: true, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 15 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_true_anyof_true_oneof_false_fails + # allOf: true, anyOf: true, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_true_anyof_true_oneof_true_passes + # allOf: true, anyOf: true, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 30 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_allof_true_anyof_false_oneof_true_fails + # allOf: true, anyOf: false, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 10 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_true_oneof_false_fails + # allOf: false, anyOf: true, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_false_oneof_false_fails + # allOf: false, anyOf: false, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_request_body(self): + """Test case for post_allof_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_allof_passes + # allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_mismatch_first_fails + # mismatch first + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_request_body(body=body) + + # test_mismatch_second_fails + # mismatch second + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_request_body(body=body) + + # test_wrong_type_fails + # wrong type + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + "quux", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_request_body(body=body) + + + + def test_post_allof_response_body_for_content_types(self): + """Test case for post_allof_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_allof_passes + # allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_first_fails + # mismatch first + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_second_fails + # mismatch second + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_wrong_type_fails + # wrong type + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + "quux", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_simple_types_request_body(self): + """Test case for post_allof_simple_types_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_simple_types_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_valid_passes + # valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 25 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_simple_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofSimpleTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_mismatch_one_fails + # mismatch one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 35 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_simple_types_request_body(body=body) + + + + def test_post_allof_simple_types_response_body_for_content_types(self): + """Test case for post_allof_simple_types_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_simple_types_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_passes + # valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 25 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_simple_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofSimpleTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_one_fails + # mismatch one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 35 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_simple_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofSimpleTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_with_base_schema_request_body(self): + """Test case for post_allof_with_base_schema_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_with_base_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_valid_passes + # valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "bar": + 2, + "baz": + None, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_with_base_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofWithBaseSchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_mismatch_first_allof_fails + # mismatch first allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + "baz": + None, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_base_schema_request_body(body=body) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "baz": + None, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_base_schema_request_body(body=body) + + # test_mismatch_both_fails + # mismatch both + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_base_schema_request_body(body=body) + + # test_mismatch_second_allof_fails + # mismatch second allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "bar": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_base_schema_request_body(body=body) + + + + def test_post_allof_with_base_schema_response_body_for_content_types(self): + """Test case for post_allof_with_base_schema_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_with_base_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_passes + # valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "bar": + 2, + "baz": + None, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_first_allof_fails + # mismatch first allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + "baz": + None, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "baz": + None, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_both_fails + # mismatch both + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_second_allof_fails + # mismatch second allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_with_one_empty_schema_request_body(self): + """Test case for post_allof_with_one_empty_schema_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_with_one_empty_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_any_data_is_valid_passes + # any data is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_with_one_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofWithOneEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_allof_with_one_empty_schema_response_body_for_content_types(self): + """Test case for post_allof_with_one_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_with_one_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_any_data_is_valid_passes + # any data is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_one_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_with_the_first_empty_schema_request_body(self): + """Test case for post_allof_with_the_first_empty_schema_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_with_the_first_empty_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_string_is_invalid_fails + # string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_the_first_empty_schema_request_body(body=body) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_with_the_first_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofWithTheFirstEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_allof_with_the_first_empty_schema_response_body_for_content_types(self): + """Test case for post_allof_with_the_first_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_with_the_first_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_string_is_invalid_fails + # string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_the_first_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_the_first_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_with_the_last_empty_schema_request_body(self): + """Test case for post_allof_with_the_last_empty_schema_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_with_the_last_empty_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_string_is_invalid_fails + # string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_the_last_empty_schema_request_body(body=body) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_with_the_last_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofWithTheLastEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_allof_with_the_last_empty_schema_response_body_for_content_types(self): + """Test case for post_allof_with_the_last_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_with_the_last_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_string_is_invalid_fails + # string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_the_last_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_the_last_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_with_two_empty_schemas_request_body(self): + """Test case for post_allof_with_two_empty_schemas_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_with_two_empty_schemas_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_any_data_is_valid_passes + # any data is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_with_two_empty_schemas_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofWithTwoEmptySchemasRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_allof_with_two_empty_schemas_response_body_for_content_types(self): + """Test case for post_allof_with_two_empty_schemas_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_allof_with_two_empty_schemas_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_any_data_is_valid_passes + # any data is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_two_empty_schemas_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_anyof_complex_types_request_body(self): + """Test case for post_anyof_complex_types_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_anyof_complex_types_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_second_anyof_valid_complex_passes + # second anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_neither_anyof_valid_complex_fails + # neither anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 2, + "bar": + "quux", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_anyof_complex_types_request_body(body=body) + + # test_both_anyof_valid_complex_passes + # both anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_first_anyof_valid_complex_passes + # first anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_anyof_complex_types_response_body_for_content_types(self): + """Test case for post_anyof_complex_types_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_anyof_complex_types_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_second_anyof_valid_complex_passes + # second anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_anyof_valid_complex_fails + # neither anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 2, + "bar": + "quux", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_anyof_valid_complex_passes + # both anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_first_anyof_valid_complex_passes + # first anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_anyof_request_body(self): + """Test case for post_anyof_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_anyof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_second_anyof_valid_passes + # second anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.5 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_neither_anyof_valid_fails + # neither anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.5 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_anyof_request_body(body=body) + + # test_both_anyof_valid_passes + # both anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_first_anyof_valid_passes + # first anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_anyof_response_body_for_content_types(self): + """Test case for post_anyof_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_anyof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_second_anyof_valid_passes + # second anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_anyof_valid_fails + # neither anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_anyof_valid_passes + # both anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_first_anyof_valid_passes + # first anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_anyof_with_base_schema_request_body(self): + """Test case for post_anyof_with_base_schema_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_anyof_with_base_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_one_anyof_valid_passes + # one anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_with_base_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofWithBaseSchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_both_anyof_invalid_fails + # both anyOf invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_anyof_with_base_schema_request_body(body=body) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_anyof_with_base_schema_request_body(body=body) + + + + def test_post_anyof_with_base_schema_response_body_for_content_types(self): + """Test case for post_anyof_with_base_schema_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_anyof_with_base_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_one_anyof_valid_passes + # one anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_both_anyof_invalid_fails + # both anyOf invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_anyof_with_one_empty_schema_request_body(self): + """Test case for post_anyof_with_one_empty_schema_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_anyof_with_one_empty_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_string_is_valid_passes + # string is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_with_one_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_with_one_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_anyof_with_one_empty_schema_response_body_for_content_types(self): + """Test case for post_anyof_with_one_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_anyof_with_one_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_string_is_valid_passes + # string is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_with_one_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_with_one_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_array_type_matches_arrays_request_body(self): + """Test case for post_array_type_matches_arrays_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_array_type_matches_arrays_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_a_float_is_not_an_array_fails + # a float is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + # test_a_boolean_is_not_an_array_fails + # a boolean is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + # test_null_is_not_an_array_fails + # null is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + # test_an_object_is_not_an_array_fails + # an object is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + # test_a_string_is_not_an_array_fails + # a string is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + # test_an_array_is_an_array_passes + # an array is an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_array_type_matches_arrays_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postArrayTypeMatchesArraysRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_integer_is_not_an_array_fails + # an integer is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + + + def test_post_array_type_matches_arrays_response_body_for_content_types(self): + """Test case for post_array_type_matches_arrays_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_array_type_matches_arrays_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_a_float_is_not_an_array_fails + # a float is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_an_array_fails + # a boolean is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_an_array_fails + # null is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_an_array_fails + # an object is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_an_array_fails + # a string is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_an_array_passes + # an array is an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_integer_is_not_an_array_fails + # an integer is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_boolean_type_matches_booleans_request_body(self): + """Test case for post_boolean_type_matches_booleans_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_boolean_type_matches_booleans_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_an_empty_string_is_not_a_boolean_fails + # an empty string is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_a_float_is_not_a_boolean_fails + # a float is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_null_is_not_a_boolean_fails + # null is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_zero_is_not_a_boolean_fails + # zero is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_an_array_is_not_a_boolean_fails + # an array is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_a_string_is_not_a_boolean_fails + # a string is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_false_is_a_boolean_passes + # false is a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_boolean_type_matches_booleans_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_integer_is_not_a_boolean_fails + # an integer is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_true_is_a_boolean_passes + # true is a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_boolean_type_matches_booleans_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_object_is_not_a_boolean_fails + # an object is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + + + def test_post_boolean_type_matches_booleans_response_body_for_content_types(self): + """Test case for post_boolean_type_matches_booleans_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_boolean_type_matches_booleans_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_empty_string_is_not_a_boolean_fails + # an empty string is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_float_is_not_a_boolean_fails + # a float is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_a_boolean_fails + # null is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_zero_is_not_a_boolean_fails + # zero is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_a_boolean_fails + # an array is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_a_boolean_fails + # a string is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_false_is_a_boolean_passes + # false is a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_integer_is_not_a_boolean_fails + # an integer is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_a_boolean_passes + # true is a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_object_is_not_a_boolean_fails + # an object is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_by_int_request_body(self): + """Test case for post_by_int_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_by_int_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_int_by_int_fail_fails + # int by int fail + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 7 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_by_int_request_body(body=body) + + # test_int_by_int_passes + # int by int + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 10 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_by_int_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postByIntRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_by_int_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postByIntRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_by_int_response_body_for_content_types(self): + """Test case for post_by_int_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_by_int_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_int_by_int_fail_fails + # int by int fail + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_by_int_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_int_by_int_passes + # int by int + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 10 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_int_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_int_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_by_number_request_body(self): + """Test case for post_by_number_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_by_number_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_45_is_multiple_of15_passes + # 4.5 is multiple of 1.5 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 4.5 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_by_number_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postByNumberRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_35_is_not_multiple_of15_fails + # 35 is not multiple of 1.5 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 35 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_by_number_request_body(body=body) + + # test_zero_is_multiple_of_anything_passes + # zero is multiple of anything + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_by_number_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postByNumberRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_by_number_response_body_for_content_types(self): + """Test case for post_by_number_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_by_number_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_45_is_multiple_of15_passes + # 4.5 is multiple of 1.5 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 4.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_35_is_not_multiple_of15_fails + # 35 is not multiple of 1.5 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 35 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_by_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_zero_is_multiple_of_anything_passes + # zero is multiple of anything + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_by_small_number_request_body(self): + """Test case for post_by_small_number_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_by_small_number_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_000751_is_not_multiple_of00001_fails + # 0.00751 is not multiple of 0.0001 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.00751 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_by_small_number_request_body(body=body) + + # test_00075_is_multiple_of00001_passes + # 0.0075 is multiple of 0.0001 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0075 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_by_small_number_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postBySmallNumberRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_by_small_number_response_body_for_content_types(self): + """Test case for post_by_small_number_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_by_small_number_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_000751_is_not_multiple_of00001_fails + # 0.00751 is not multiple of 0.0001 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.00751 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_by_small_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBySmallNumberResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_00075_is_multiple_of00001_passes + # 0.0075 is multiple of 0.0001 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0075 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_small_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBySmallNumberResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_date_time_format_request_body(self): + """Test case for post_date_time_format_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_date_time_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_date_time_format_response_body_for_content_types(self): + """Test case for post_date_time_format_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_date_time_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_email_format_request_body(self): + """Test case for post_email_format_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_email_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_email_format_response_body_for_content_types(self): + """Test case for post_email_format_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_email_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_enum_with0_does_not_match_false_request_body(self): + """Test case for post_enum_with0_does_not_match_false_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enum_with0_does_not_match_false_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_integer_zero_is_valid_passes + # integer zero is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with0_does_not_match_false_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_float_zero_is_valid_passes + # float zero is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with0_does_not_match_false_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_false_is_invalid_fails + # false is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with0_does_not_match_false_request_body(body=body) + + + + def test_post_enum_with0_does_not_match_false_response_body_for_content_types(self): + """Test case for post_enum_with0_does_not_match_false_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enum_with0_does_not_match_false_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_integer_zero_is_valid_passes + # integer zero is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with0_does_not_match_false_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_float_zero_is_valid_passes + # float zero is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with0_does_not_match_false_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_false_is_invalid_fails + # false is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with0_does_not_match_false_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enum_with1_does_not_match_true_request_body(self): + """Test case for post_enum_with1_does_not_match_true_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enum_with1_does_not_match_true_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_true_is_invalid_fails + # true is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with1_does_not_match_true_request_body(body=body) + + # test_integer_one_is_valid_passes + # integer one is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with1_does_not_match_true_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_float_one_is_valid_passes + # float one is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with1_does_not_match_true_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_enum_with1_does_not_match_true_response_body_for_content_types(self): + """Test case for post_enum_with1_does_not_match_true_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enum_with1_does_not_match_true_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_true_is_invalid_fails + # true is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with1_does_not_match_true_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_integer_one_is_valid_passes + # integer one is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with1_does_not_match_true_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_float_one_is_valid_passes + # float one is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with1_does_not_match_true_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_enum_with_escaped_characters_request_body(self): + """Test case for post_enum_with_escaped_characters_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enum_with_escaped_characters_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_member2_is_valid_passes + # member 2 is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo\rbar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with_escaped_characters_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_member1_is_valid_passes + # member 1 is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo\nbar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with_escaped_characters_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_another_string_is_invalid_fails + # another string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "abc" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with_escaped_characters_request_body(body=body) + + + + def test_post_enum_with_escaped_characters_response_body_for_content_types(self): + """Test case for post_enum_with_escaped_characters_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enum_with_escaped_characters_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_member2_is_valid_passes + # member 2 is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo\rbar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_member1_is_valid_passes + # member 1 is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo\nbar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_another_string_is_invalid_fails + # another string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "abc" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enum_with_false_does_not_match0_request_body(self): + """Test case for post_enum_with_false_does_not_match0_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enum_with_false_does_not_match0_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_false_is_valid_passes + # false is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with_false_does_not_match0_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWithFalseDoesNotMatch0RequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_float_zero_is_invalid_fails + # float zero is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with_false_does_not_match0_request_body(body=body) + + # test_integer_zero_is_invalid_fails + # integer zero is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with_false_does_not_match0_request_body(body=body) + + + + def test_post_enum_with_false_does_not_match0_response_body_for_content_types(self): + """Test case for post_enum_with_false_does_not_match0_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enum_with_false_does_not_match0_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_false_is_valid_passes + # false is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_false_does_not_match0_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_float_zero_is_invalid_fails + # float zero is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_false_does_not_match0_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_integer_zero_is_invalid_fails + # integer zero is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_false_does_not_match0_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enum_with_true_does_not_match1_request_body(self): + """Test case for post_enum_with_true_does_not_match1_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enum_with_true_does_not_match1_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_float_one_is_invalid_fails + # float one is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with_true_does_not_match1_request_body(body=body) + + # test_true_is_valid_passes + # true is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with_true_does_not_match1_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWithTrueDoesNotMatch1RequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_integer_one_is_invalid_fails + # integer one is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with_true_does_not_match1_request_body(body=body) + + + + def test_post_enum_with_true_does_not_match1_response_body_for_content_types(self): + """Test case for post_enum_with_true_does_not_match1_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enum_with_true_does_not_match1_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_float_one_is_invalid_fails + # float one is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_true_does_not_match1_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_valid_passes + # true is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_true_does_not_match1_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_integer_one_is_invalid_fails + # integer one is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_true_does_not_match1_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enums_in_properties_request_body(self): + """Test case for post_enums_in_properties_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enums_in_properties_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_missing_optional_property_is_valid_passes + # missing optional property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + "bar", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enums_in_properties_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_wrong_foo_value_fails + # wrong foo value + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foot", + "bar": + "bar", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enums_in_properties_request_body(body=body) + + # test_both_properties_are_valid_passes + # both properties are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + "bar": + "bar", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enums_in_properties_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_wrong_bar_value_fails + # wrong bar value + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + "bar": + "bart", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enums_in_properties_request_body(body=body) + + # test_missing_all_properties_is_invalid_fails + # missing all properties is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enums_in_properties_request_body(body=body) + + # test_missing_required_property_is_invalid_fails + # missing required property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enums_in_properties_request_body(body=body) + + + + def test_post_enums_in_properties_response_body_for_content_types(self): + """Test case for post_enums_in_properties_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_enums_in_properties_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_missing_optional_property_is_valid_passes + # missing optional property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_wrong_foo_value_fails + # wrong foo value + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foot", + "bar": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_properties_are_valid_passes + # both properties are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + "bar": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_wrong_bar_value_fails + # wrong bar value + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + "bar": + "bart", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_missing_all_properties_is_invalid_fails + # missing all properties is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_missing_required_property_is_invalid_fails + # missing required property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_forbidden_property_request_body(self): + """Test case for post_forbidden_property_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_forbidden_property_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_present_fails + # property present + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_forbidden_property_request_body(body=body) + + # test_property_absent_passes + # property absent + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 1, + "baz": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_forbidden_property_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postForbiddenPropertyRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_forbidden_property_response_body_for_content_types(self): + """Test case for post_forbidden_property_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_forbidden_property_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_present_fails + # property present + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_forbidden_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postForbiddenPropertyResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_property_absent_passes + # property absent + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 1, + "baz": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_forbidden_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postForbiddenPropertyResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_hostname_format_request_body(self): + """Test case for post_hostname_format_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_hostname_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_hostname_format_response_body_for_content_types(self): + """Test case for post_hostname_format_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_hostname_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_integer_type_matches_integers_request_body(self): + """Test case for post_integer_type_matches_integers_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_integer_type_matches_integers_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_an_object_is_not_an_integer_fails + # an object is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_a_string_is_not_an_integer_fails + # a string is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_null_is_not_an_integer_fails + # null is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_a_float_with_zero_fractional_part_is_an_integer_passes + # a float with zero fractional part is an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_integer_type_matches_integers_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_float_is_not_an_integer_fails + # a float is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_a_boolean_is_not_an_integer_fails + # a boolean is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_an_integer_is_an_integer_passes + # an integer is an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_integer_type_matches_integers_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails + # a string is still not an integer, even if it looks like one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_an_array_is_not_an_integer_fails + # an array is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + + + def test_post_integer_type_matches_integers_response_body_for_content_types(self): + """Test case for post_integer_type_matches_integers_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_integer_type_matches_integers_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_object_is_not_an_integer_fails + # an object is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_an_integer_fails + # a string is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_an_integer_fails + # null is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_float_with_zero_fractional_part_is_an_integer_passes + # a float with zero fractional part is an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_float_is_not_an_integer_fails + # a float is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_an_integer_fails + # a boolean is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_an_integer_passes + # an integer is an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails + # a string is still not an integer, even if it looks like one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_an_integer_fails + # an array is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(self): + """Test case for post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails + # always invalid, but naive implementations may raise an overflow error + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0E308 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body=body) + + # test_valid_integer_with_multipleof_float_passes + # valid integer with multipleOf float + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123456789 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types(self): + """Test case for post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails + # always invalid, but naive implementations may raise an overflow error + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0E308 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_valid_integer_with_multipleof_float_passes + # valid integer with multipleOf float + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123456789 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_invalid_string_value_for_default_request_body(self): + """Test case for post_invalid_string_value_for_default_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_invalid_string_value_for_default_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_valid_when_property_is_specified_passes + # valid when property is specified + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + "good", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_invalid_string_value_for_default_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_still_valid_when_the_invalid_default_is_used_passes + # still valid when the invalid default is used + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_invalid_string_value_for_default_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_invalid_string_value_for_default_response_body_for_content_types(self): + """Test case for post_invalid_string_value_for_default_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_invalid_string_value_for_default_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_when_property_is_specified_passes + # valid when property is specified + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + "good", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_invalid_string_value_for_default_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_still_valid_when_the_invalid_default_is_used_passes + # still valid when the invalid default is used + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_invalid_string_value_for_default_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_ipv4_format_request_body(self): + """Test case for post_ipv4_format_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ipv4_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_ipv4_format_response_body_for_content_types(self): + """Test case for post_ipv4_format_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ipv4_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_ipv6_format_request_body(self): + """Test case for post_ipv6_format_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ipv6_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_ipv6_format_response_body_for_content_types(self): + """Test case for post_ipv6_format_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ipv6_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_json_pointer_format_request_body(self): + """Test case for post_json_pointer_format_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_json_pointer_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_json_pointer_format_response_body_for_content_types(self): + """Test case for post_json_pointer_format_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_json_pointer_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maximum_validation_request_body(self): + """Test case for post_maximum_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maximum_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_below_the_maximum_is_valid_passes + # below the maximum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.6 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_above_the_maximum_is_invalid_fails + # above the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3.5 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maximum_validation_request_body(body=body) + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_maximum_validation_response_body_for_content_types(self): + """Test case for post_maximum_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maximum_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_below_the_maximum_is_valid_passes + # below the maximum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_above_the_maximum_is_invalid_fails + # above the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maximum_validation_with_unsigned_integer_request_body(self): + """Test case for post_maximum_validation_with_unsigned_integer_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maximum_validation_with_unsigned_integer_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_below_the_maximum_is_invalid_passes + # below the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 299.97 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_above_the_maximum_is_invalid_fails + # above the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300.5 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maximum_validation_with_unsigned_integer_request_body(body=body) + + # test_boundary_point_integer_is_valid_passes + # boundary point integer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_boundary_point_float_is_valid_passes + # boundary point float is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_maximum_validation_with_unsigned_integer_response_body_for_content_types(self): + """Test case for post_maximum_validation_with_unsigned_integer_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maximum_validation_with_unsigned_integer_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_below_the_maximum_is_invalid_passes + # below the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 299.97 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_above_the_maximum_is_invalid_fails + # above the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_boundary_point_integer_is_valid_passes + # boundary point integer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_boundary_point_float_is_valid_passes + # boundary point float is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maxitems_validation_request_body(self): + """Test case for post_maxitems_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maxitems_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 3, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maxitems_validation_request_body(body=body) + + # test_ignores_non_arrays_passes + # ignores non-arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_maxitems_validation_response_body_for_content_types(self): + """Test case for post_maxitems_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maxitems_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 3, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_arrays_passes + # ignores non-arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maxlength_validation_request_body(self): + """Test case for post_maxlength_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maxlength_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maxlength_validation_request_body(body=body) + + # test_ignores_non_strings_passes + # ignores non-strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 100 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "f" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_two_supplementary_unicode_code_points_is_long_enough_passes + # two supplementary Unicode code points is long enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "💩💩" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "fo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_maxlength_validation_response_body_for_content_types(self): + """Test case for post_maxlength_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maxlength_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_strings_passes + # ignores non-strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 100 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "f" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_two_supplementary_unicode_code_points_is_long_enough_passes + # two supplementary Unicode code points is long enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "💩💩" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "fo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maxproperties0_means_the_object_is_empty_request_body(self): + """Test case for post_maxproperties0_means_the_object_is_empty_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maxproperties0_means_the_object_is_empty_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_no_properties_is_valid_passes + # no properties is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties0_means_the_object_is_empty_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_one_property_is_invalid_fails + # one property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maxproperties0_means_the_object_is_empty_request_body(body=body) + + + + def test_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types(self): + """Test case for post_maxproperties0_means_the_object_is_empty_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maxproperties0_means_the_object_is_empty_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_no_properties_is_valid_passes + # no properties is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_one_property_is_invalid_fails + # one property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_maxproperties_validation_request_body(self): + """Test case for post_maxproperties_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maxproperties_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "baz": + 3, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maxproperties_validation_request_body(body=body) + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 3, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_maxproperties_validation_response_body_for_content_types(self): + """Test case for post_maxproperties_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_maxproperties_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "baz": + 3, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 3, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minimum_validation_request_body(self): + """Test case for post_minimum_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_minimum_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_below_the_minimum_is_invalid_fails + # below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.6 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minimum_validation_request_body(body=body) + + # test_above_the_minimum_is_valid_passes + # above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.6 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_minimum_validation_response_body_for_content_types(self): + """Test case for post_minimum_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_minimum_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_below_the_minimum_is_invalid_fails + # below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_above_the_minimum_is_valid_passes + # above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minimum_validation_with_signed_integer_request_body(self): + """Test case for post_minimum_validation_with_signed_integer_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_minimum_validation_with_signed_integer_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_positive_above_the_minimum_is_valid_passes + # positive above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_int_below_the_minimum_is_invalid_fails + # int below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -3 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minimum_validation_with_signed_integer_request_body(body=body) + + # test_float_below_the_minimum_is_invalid_fails + # float below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2.0001 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minimum_validation_with_signed_integer_request_body(body=body) + + # test_boundary_point_with_float_is_valid_passes + # boundary point with float is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_negative_above_the_minimum_is_valid_passes + # negative above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_minimum_validation_with_signed_integer_response_body_for_content_types(self): + """Test case for post_minimum_validation_with_signed_integer_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_minimum_validation_with_signed_integer_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_positive_above_the_minimum_is_valid_passes + # positive above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_int_below_the_minimum_is_invalid_fails + # int below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_float_below_the_minimum_is_invalid_fails + # float below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2.0001 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_boundary_point_with_float_is_valid_passes + # boundary point with float is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_negative_above_the_minimum_is_valid_passes + # negative above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minitems_validation_request_body(self): + """Test case for post_minitems_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_minitems_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minitems_validation_request_body(body=body) + + # test_ignores_non_arrays_passes + # ignores non-arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_minitems_validation_response_body_for_content_types(self): + """Test case for post_minitems_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_minitems_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_arrays_passes + # ignores non-arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minlength_validation_request_body(self): + """Test case for post_minlength_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_minlength_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "f" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minlength_validation_request_body(body=body) + + # test_one_supplementary_unicode_code_point_is_not_long_enough_fails + # one supplementary Unicode code point is not long enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "💩" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minlength_validation_request_body(body=body) + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_non_strings_passes + # ignores non-strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "fo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_minlength_validation_response_body_for_content_types(self): + """Test case for post_minlength_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_minlength_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "f" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_supplementary_unicode_code_point_is_not_long_enough_fails + # one supplementary Unicode code point is not long enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "💩" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_strings_passes + # ignores non-strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "fo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minproperties_validation_request_body(self): + """Test case for post_minproperties_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_minproperties_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minproperties_validation_request_body(body=body) + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_minproperties_validation_response_body_for_content_types(self): + """Test case for post_minproperties_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_minproperties_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_nested_allof_to_check_validation_semantics_request_body(self): + """Test case for post_nested_allof_to_check_validation_semantics_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_nested_allof_to_check_validation_semantics_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nested_allof_to_check_validation_semantics_request_body(body=body) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_nested_allof_to_check_validation_semantics_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_nested_allof_to_check_validation_semantics_response_body_for_content_types(self): + """Test case for post_nested_allof_to_check_validation_semantics_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_nested_allof_to_check_validation_semantics_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_nested_anyof_to_check_validation_semantics_request_body(self): + """Test case for post_nested_anyof_to_check_validation_semantics_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_nested_anyof_to_check_validation_semantics_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nested_anyof_to_check_validation_semantics_request_body(body=body) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_nested_anyof_to_check_validation_semantics_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types(self): + """Test case for post_nested_anyof_to_check_validation_semantics_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_nested_anyof_to_check_validation_semantics_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_nested_items_request_body(self): + """Test case for post_nested_items_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_nested_items_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_valid_nested_array_passes + # valid nested array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + [ + 1, + ], + ], + [ + [ + 2, + ], + [ + 3, + ], + ], + ], + [ + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_nested_items_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNestedItemsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_nested_array_with_invalid_type_fails + # nested array with invalid type + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + [ + "1", + ], + ], + [ + [ + 2, + ], + [ + 3, + ], + ], + ], + [ + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ], + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nested_items_request_body(body=body) + + # test_not_deep_enough_fails + # not deep enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 1, + ], + [ + 2, + ], + [ + 3, + ], + ], + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nested_items_request_body(body=body) + + + + def test_post_nested_items_response_body_for_content_types(self): + """Test case for post_nested_items_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_nested_items_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_nested_array_passes + # valid nested array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + [ + 1, + ], + ], + [ + [ + 2, + ], + [ + 3, + ], + ], + ], + [ + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_nested_array_with_invalid_type_fails + # nested array with invalid type + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + [ + "1", + ], + ], + [ + [ + 2, + ], + [ + 3, + ], + ], + ], + [ + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_not_deep_enough_fails + # not deep enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 1, + ], + [ + 2, + ], + [ + 3, + ], + ], + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_nested_oneof_to_check_validation_semantics_request_body(self): + """Test case for post_nested_oneof_to_check_validation_semantics_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_nested_oneof_to_check_validation_semantics_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nested_oneof_to_check_validation_semantics_request_body(body=body) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_nested_oneof_to_check_validation_semantics_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types(self): + """Test case for post_nested_oneof_to_check_validation_semantics_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_nested_oneof_to_check_validation_semantics_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_not_more_complex_schema_request_body(self): + """Test case for post_not_more_complex_schema_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_not_more_complex_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_other_match_passes + # other match + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_not_more_complex_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_mismatch_fails + # mismatch + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "bar", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_not_more_complex_schema_request_body(body=body) + + # test_match_passes + # match + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_not_more_complex_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_not_more_complex_schema_response_body_for_content_types(self): + """Test case for post_not_more_complex_schema_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_not_more_complex_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_other_match_passes + # other match + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_not_more_complex_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_fails + # mismatch + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_not_more_complex_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_match_passes + # match + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_not_more_complex_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_not_request_body(self): + """Test case for post_not_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_not_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_allowed_passes + # allowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_not_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNotRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_disallowed_fails + # disallowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_not_request_body(body=body) + + + + def test_post_not_response_body_for_content_types(self): + """Test case for post_not_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_not_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_allowed_passes + # allowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_not_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_disallowed_fails + # disallowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_not_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_nul_characters_in_strings_request_body(self): + """Test case for post_nul_characters_in_strings_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_nul_characters_in_strings_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_match_string_with_nul_passes + # match string with nul + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "hello\x00there" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_nul_characters_in_strings_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNulCharactersInStringsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_do_not_match_string_lacking_nul_fails + # do not match string lacking nul + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "hellothere" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nul_characters_in_strings_request_body(body=body) + + + + def test_post_nul_characters_in_strings_response_body_for_content_types(self): + """Test case for post_nul_characters_in_strings_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_nul_characters_in_strings_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_match_string_with_nul_passes + # match string with nul + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "hello\x00there" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nul_characters_in_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNulCharactersInStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_do_not_match_string_lacking_nul_fails + # do not match string lacking nul + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "hellothere" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nul_characters_in_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNulCharactersInStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_null_type_matches_only_the_null_object_request_body(self): + """Test case for post_null_type_matches_only_the_null_object_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_null_type_matches_only_the_null_object_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_a_float_is_not_null_fails + # a float is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_an_object_is_not_null_fails + # an object is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_false_is_not_null_fails + # false is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_an_integer_is_not_null_fails + # an integer is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_true_is_not_null_fails + # true is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_zero_is_not_null_fails + # zero is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_an_empty_string_is_not_null_fails + # an empty string is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_null_is_null_passes + # null is null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_null_type_matches_only_the_null_object_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_array_is_not_null_fails + # an array is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_a_string_is_not_null_fails + # a string is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + + + def test_post_null_type_matches_only_the_null_object_response_body_for_content_types(self): + """Test case for post_null_type_matches_only_the_null_object_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_null_type_matches_only_the_null_object_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_a_float_is_not_null_fails + # a float is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_null_fails + # an object is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_false_is_not_null_fails + # false is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_not_null_fails + # an integer is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_not_null_fails + # true is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_zero_is_not_null_fails + # zero is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_empty_string_is_not_null_fails + # an empty string is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_null_passes + # null is null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_array_is_not_null_fails + # an array is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_null_fails + # a string is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_number_type_matches_numbers_request_body(self): + """Test case for post_number_type_matches_numbers_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_number_type_matches_numbers_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_an_array_is_not_a_number_fails + # an array is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_null_is_not_a_number_fails + # null is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_an_object_is_not_a_number_fails + # an object is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_a_boolean_is_not_a_number_fails + # a boolean is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_a_float_is_a_number_passes + # a float is a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails + # a string is still not a number, even if it looks like one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_a_string_is_not_a_number_fails + # a string is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_an_integer_is_a_number_passes + # an integer is a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes + # a float with zero fractional part is a number (and an integer) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_number_type_matches_numbers_response_body_for_content_types(self): + """Test case for post_number_type_matches_numbers_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_number_type_matches_numbers_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_array_is_not_a_number_fails + # an array is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_a_number_fails + # null is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_a_number_fails + # an object is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_a_number_fails + # a boolean is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_float_is_a_number_passes + # a float is a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails + # a string is still not a number, even if it looks like one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_a_number_fails + # a string is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_a_number_passes + # an integer is a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes + # a float with zero fractional part is a number (and an integer) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_object_properties_validation_request_body(self): + """Test case for post_object_properties_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_object_properties_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_object_properties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_object_properties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_one_property_invalid_is_invalid_fails + # one property invalid is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + { + }, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_properties_validation_request_body(body=body) + + # test_both_properties_present_and_valid_is_valid_passes + # both properties present and valid is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + "baz", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_object_properties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_doesn_t_invalidate_other_properties_passes + # doesn't invalidate other properties + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "quux": + [ + ], + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_object_properties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_both_properties_invalid_is_invalid_fails + # both properties invalid is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + [ + ], + "bar": + { + }, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_properties_validation_request_body(body=body) + + + + def test_post_object_properties_validation_response_body_for_content_types(self): + """Test case for post_object_properties_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_object_properties_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_one_property_invalid_is_invalid_fails + # one property invalid is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + { + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_properties_present_and_valid_is_valid_passes + # both properties present and valid is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_doesn_t_invalidate_other_properties_passes + # doesn't invalidate other properties + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "quux": + [ + ], + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_both_properties_invalid_is_invalid_fails + # both properties invalid is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + [ + ], + "bar": + { + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_object_type_matches_objects_request_body(self): + """Test case for post_object_type_matches_objects_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_object_type_matches_objects_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_a_float_is_not_an_object_fails + # a float is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + # test_null_is_not_an_object_fails + # null is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + # test_an_array_is_not_an_object_fails + # an array is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + # test_an_object_is_an_object_passes + # an object is an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_object_type_matches_objects_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postObjectTypeMatchesObjectsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_string_is_not_an_object_fails + # a string is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + # test_an_integer_is_not_an_object_fails + # an integer is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + # test_a_boolean_is_not_an_object_fails + # a boolean is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + + + def test_post_object_type_matches_objects_response_body_for_content_types(self): + """Test case for post_object_type_matches_objects_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_object_type_matches_objects_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_a_float_is_not_an_object_fails + # a float is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_an_object_fails + # null is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_an_object_fails + # an array is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_an_object_passes + # an object is an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_string_is_not_an_object_fails + # a string is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_not_an_object_fails + # an integer is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_an_object_fails + # a boolean is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_oneof_complex_types_request_body(self): + """Test case for post_oneof_complex_types_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_oneof_complex_types_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_first_oneof_valid_complex_passes + # first oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_complex_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_neither_oneof_valid_complex_fails + # neither oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 2, + "bar": + "quux", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_complex_types_request_body(body=body) + + # test_both_oneof_valid_complex_fails + # both oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_complex_types_request_body(body=body) + + # test_second_oneof_valid_complex_passes + # second oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_complex_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_oneof_complex_types_response_body_for_content_types(self): + """Test case for post_oneof_complex_types_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_oneof_complex_types_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_first_oneof_valid_complex_passes + # first oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_oneof_valid_complex_fails + # neither oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 2, + "bar": + "quux", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_oneof_valid_complex_fails + # both oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_second_oneof_valid_complex_passes + # second oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_oneof_request_body(self): + """Test case for post_oneof_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_oneof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_second_oneof_valid_passes + # second oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.5 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_both_oneof_valid_fails + # both oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_request_body(body=body) + + # test_first_oneof_valid_passes + # first oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_neither_oneof_valid_fails + # neither oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.5 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_request_body(body=body) + + + + def test_post_oneof_response_body_for_content_types(self): + """Test case for post_oneof_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_oneof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_second_oneof_valid_passes + # second oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_both_oneof_valid_fails + # both oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_first_oneof_valid_passes + # first oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_oneof_valid_fails + # neither oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_oneof_with_base_schema_request_body(self): + """Test case for post_oneof_with_base_schema_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_oneof_with_base_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_both_oneof_valid_fails + # both oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_with_base_schema_request_body(body=body) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_with_base_schema_request_body(body=body) + + # test_one_oneof_valid_passes + # one oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_with_base_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofWithBaseSchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_oneof_with_base_schema_response_body_for_content_types(self): + """Test case for post_oneof_with_base_schema_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_oneof_with_base_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_both_oneof_valid_fails + # both oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_oneof_valid_passes + # one oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_oneof_with_empty_schema_request_body(self): + """Test case for post_oneof_with_empty_schema_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_oneof_with_empty_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_both_valid_invalid_fails + # both valid - invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_with_empty_schema_request_body(body=body) + + # test_one_valid_valid_passes + # one valid - valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_with_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofWithEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_oneof_with_empty_schema_response_body_for_content_types(self): + """Test case for post_oneof_with_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_oneof_with_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_both_valid_invalid_fails + # both valid - invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_with_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_valid_valid_passes + # one valid - valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_with_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_pattern_is_not_anchored_request_body(self): + """Test case for post_pattern_is_not_anchored_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_pattern_is_not_anchored_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_matches_a_substring_passes + # matches a substring + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "xxaayy" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_is_not_anchored_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternIsNotAnchoredRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_pattern_is_not_anchored_response_body_for_content_types(self): + """Test case for post_pattern_is_not_anchored_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_pattern_is_not_anchored_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_matches_a_substring_passes + # matches a substring + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "xxaayy" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_is_not_anchored_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_pattern_validation_request_body(self): + """Test case for post_pattern_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_pattern_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_objects_passes + # ignores objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_null_passes + # ignores null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_floats_passes + # ignores floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_non_matching_pattern_is_invalid_fails + # a non-matching pattern is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "abc" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_pattern_validation_request_body(body=body) + + # test_ignores_booleans_passes + # ignores booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_matching_pattern_is_valid_passes + # a matching pattern is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "aaa" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_integers_passes + # ignores integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_pattern_validation_response_body_for_content_types(self): + """Test case for post_pattern_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_pattern_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_objects_passes + # ignores objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_null_passes + # ignores null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_floats_passes + # ignores floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_non_matching_pattern_is_invalid_fails + # a non-matching pattern is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "abc" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_booleans_passes + # ignores booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_matching_pattern_is_valid_passes + # a matching pattern is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "aaa" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_integers_passes + # ignores integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_properties_with_escaped_characters_request_body(self): + """Test case for post_properties_with_escaped_characters_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_properties_with_escaped_characters_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_object_with_all_numbers_is_valid_passes + # object with all numbers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo\nbar": + 1, + "foo\"bar": + 1, + "foo\\bar": + 1, + "foo\rbar": + 1, + "foo\tbar": + 1, + "foo\fbar": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_properties_with_escaped_characters_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPropertiesWithEscapedCharactersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_object_with_strings_is_invalid_fails + # object with strings is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo\nbar": + "1", + "foo\"bar": + "1", + "foo\\bar": + "1", + "foo\rbar": + "1", + "foo\tbar": + "1", + "foo\fbar": + "1", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_properties_with_escaped_characters_request_body(body=body) + + + + def test_post_properties_with_escaped_characters_response_body_for_content_types(self): + """Test case for post_properties_with_escaped_characters_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_properties_with_escaped_characters_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_object_with_all_numbers_is_valid_passes + # object with all numbers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo\nbar": + 1, + "foo\"bar": + 1, + "foo\\bar": + 1, + "foo\rbar": + 1, + "foo\tbar": + 1, + "foo\fbar": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_properties_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_object_with_strings_is_invalid_fails + # object with strings is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo\nbar": + "1", + "foo\"bar": + "1", + "foo\\bar": + "1", + "foo\rbar": + "1", + "foo\tbar": + "1", + "foo\fbar": + "1", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_properties_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_property_named_ref_that_is_not_a_reference_request_body(self): + """Test case for post_property_named_ref_that_is_not_a_reference_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_property_named_ref_that_is_not_a_reference_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_property_named_ref_that_is_not_a_reference_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_property_named_ref_that_is_not_a_reference_request_body(body=body) + + + + def test_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types(self): + """Test case for post_property_named_ref_that_is_not_a_reference_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_property_named_ref_that_is_not_a_reference_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_additionalproperties_request_body(self): + """Test case for post_ref_in_additionalproperties_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_additionalproperties_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "someProp": + { + "$ref": + "a", + }, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_additionalproperties_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInAdditionalpropertiesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "someProp": + { + "$ref": + 2, + }, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_additionalproperties_request_body(body=body) + + + + def test_post_ref_in_additionalproperties_response_body_for_content_types(self): + """Test case for post_ref_in_additionalproperties_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_additionalproperties_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "someProp": + { + "$ref": + "a", + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_additionalproperties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "someProp": + { + "$ref": + 2, + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_additionalproperties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_allof_request_body(self): + """Test case for post_ref_in_allof_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_allof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_allof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInAllofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_allof_request_body(body=body) + + + + def test_post_ref_in_allof_response_body_for_content_types(self): + """Test case for post_ref_in_allof_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_allof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAllofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_anyof_request_body(self): + """Test case for post_ref_in_anyof_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_anyof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_anyof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInAnyofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_anyof_request_body(body=body) + + + + def test_post_ref_in_anyof_response_body_for_content_types(self): + """Test case for post_ref_in_anyof_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_anyof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAnyofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_items_request_body(self): + """Test case for post_ref_in_items_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_items_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "$ref": + "a", + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_items_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInItemsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "$ref": + 2, + }, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_items_request_body(body=body) + + + + def test_post_ref_in_items_response_body_for_content_types(self): + """Test case for post_ref_in_items_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_items_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "$ref": + "a", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInItemsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "$ref": + 2, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInItemsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_oneof_request_body(self): + """Test case for post_ref_in_oneof_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_oneof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_oneof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInOneofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_oneof_request_body(body=body) + + + + def test_post_ref_in_oneof_response_body_for_content_types(self): + """Test case for post_ref_in_oneof_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_oneof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_property_request_body(self): + """Test case for post_ref_in_property_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_property_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "a": + { + "$ref": + "a", + }, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_property_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInPropertyRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "a": + { + "$ref": + 2, + }, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_property_request_body(body=body) + + + + def test_post_ref_in_property_response_body_for_content_types(self): + """Test case for post_ref_in_property_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_ref_in_property_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "a": + { + "$ref": + "a", + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInPropertyResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "a": + { + "$ref": + 2, + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInPropertyResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_required_default_validation_request_body(self): + """Test case for post_required_default_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_required_default_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_not_required_by_default_passes + # not required by default + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_default_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredDefaultValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_required_default_validation_response_body_for_content_types(self): + """Test case for post_required_default_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_required_default_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_not_required_by_default_passes + # not required by default + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_default_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_required_validation_request_body(self): + """Test case for post_required_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_required_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_present_required_property_is_valid_passes + # present required property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_present_required_property_is_invalid_fails + # non-present required property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 1, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_required_validation_request_body(body=body) + + + + def test_post_required_validation_response_body_for_content_types(self): + """Test case for post_required_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_required_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_present_required_property_is_valid_passes + # present required property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_present_required_property_is_invalid_fails + # non-present required property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_required_with_empty_array_request_body(self): + """Test case for post_required_with_empty_array_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_required_with_empty_array_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_not_required_passes + # property not required + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_with_empty_array_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredWithEmptyArrayRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_required_with_empty_array_response_body_for_content_types(self): + """Test case for post_required_with_empty_array_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_required_with_empty_array_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_not_required_passes + # property not required + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_with_empty_array_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_simple_enum_validation_request_body(self): + """Test case for post_simple_enum_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_simple_enum_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_something_else_is_invalid_fails + # something else is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 4 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_simple_enum_validation_request_body(body=body) + + # test_one_of_the_enum_is_valid_passes + # one of the enum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_simple_enum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postSimpleEnumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_simple_enum_validation_response_body_for_content_types(self): + """Test case for post_simple_enum_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_simple_enum_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_something_else_is_invalid_fails + # something else is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 4 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_simple_enum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postSimpleEnumValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_of_the_enum_is_valid_passes + # one of the enum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_simple_enum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postSimpleEnumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_string_type_matches_strings_request_body(self): + """Test case for post_string_type_matches_strings_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_string_type_matches_strings_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_1_is_not_a_string_fails + # 1 is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes + # a string is still a string, even if it looks like a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_empty_string_is_still_a_string_passes + # an empty string is still a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_float_is_not_a_string_fails + # a float is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_an_object_is_not_a_string_fails + # an object is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_an_array_is_not_a_string_fails + # an array is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_a_boolean_is_not_a_string_fails + # a boolean is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_null_is_not_a_string_fails + # null is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_a_string_is_a_string_passes + # a string is a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_string_type_matches_strings_response_body_for_content_types(self): + """Test case for post_string_type_matches_strings_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_string_type_matches_strings_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_1_is_not_a_string_fails + # 1 is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes + # a string is still a string, even if it looks like a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_empty_string_is_still_a_string_passes + # an empty string is still a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_float_is_not_a_string_fails + # a float is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_a_string_fails + # an object is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_a_string_fails + # an array is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_a_string_fails + # a boolean is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_a_string_fails + # null is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_a_string_passes + # a string is a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(self): + """Test case for post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_missing_properties_are_not_filled_in_with_the_default_passes + # missing properties are not filled in with the default + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_explicit_property_value_is_checked_against_maximum_passing_passes + # an explicit property value is checked against maximum (passing) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "alpha": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_explicit_property_value_is_checked_against_maximum_failing_fails + # an explicit property value is checked against maximum (failing) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "alpha": + 5, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(body=body) + + + + def test_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types(self): + """Test case for post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_missing_properties_are_not_filled_in_with_the_default_passes + # missing properties are not filled in with the default + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_explicit_property_value_is_checked_against_maximum_passing_passes + # an explicit property value is checked against maximum (passing) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "alpha": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_explicit_property_value_is_checked_against_maximum_failing_fails + # an explicit property value is checked against maximum (failing) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "alpha": + 5, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_uniqueitems_false_validation_request_body(self): + """Test case for post_uniqueitems_false_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_uniqueitems_false_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_non_unique_array_of_integers_is_valid_passes + # non-unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_objects_is_valid_passes + # unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "baz", + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_nested_objects_is_valid_passes + # non-unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_objects_is_valid_passes + # non-unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "bar", + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_1_and_true_are_unique_passes + # 1 and true are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_integers_is_valid_passes + # unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_arrays_is_valid_passes + # non-unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "foo", + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_numbers_are_unique_if_mathematically_unequal_passes + # numbers are unique if mathematically unequal + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1.0, + 1.0, + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_false_is_not_equal_to_zero_passes + # false is not equal to zero + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_nested_objects_is_valid_passes + # unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + False, + }, + }, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_0_and_false_are_unique_passes + # 0 and false are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_arrays_is_valid_passes + # unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_true_is_not_equal_to_one_passes + # true is not equal to one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_heterogeneous_types_are_valid_passes + # non-unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + { + }, + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_heterogeneous_types_are_valid_passes + # unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_uniqueitems_false_validation_response_body_for_content_types(self): + """Test case for post_uniqueitems_false_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_uniqueitems_false_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_non_unique_array_of_integers_is_valid_passes + # non-unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_objects_is_valid_passes + # unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "baz", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_nested_objects_is_valid_passes + # non-unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_objects_is_valid_passes + # non-unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "bar", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_1_and_true_are_unique_passes + # 1 and true are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_integers_is_valid_passes + # unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_arrays_is_valid_passes + # non-unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_numbers_are_unique_if_mathematically_unequal_passes + # numbers are unique if mathematically unequal + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1.0, + 1.0, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_false_is_not_equal_to_zero_passes + # false is not equal to zero + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_nested_objects_is_valid_passes + # unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + False, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_0_and_false_are_unique_passes + # 0 and false are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_arrays_is_valid_passes + # unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_true_is_not_equal_to_one_passes + # true is not equal to one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_heterogeneous_types_are_valid_passes + # non-unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + { + }, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_heterogeneous_types_are_valid_passes + # unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_uniqueitems_validation_request_body(self): + """Test case for post_uniqueitems_validation_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_uniqueitems_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_unique_array_of_objects_is_valid_passes + # unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "baz", + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_true_and_a1_are_unique_passes + # {"a": true} and {"a": 1} are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + True, + }, + { + "a": + 1, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_heterogeneous_types_are_invalid_fails + # non-unique heterogeneous types are invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + { + }, + 1, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_nested0_and_false_are_unique_passes + # nested [0] and [false] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 0, + ], + "foo", + ], + [ + [ + False, + ], + "foo", + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_false_and_a0_are_unique_passes + # {"a": false} and {"a": 0} are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + False, + }, + { + "a": + 0, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_numbers_are_unique_if_mathematically_unequal_fails + # numbers are unique if mathematically unequal + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1.0, + 1.0, + 1, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_false_is_not_equal_to_zero_passes + # false is not equal to zero + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_0_and_false_are_unique_passes + # [0] and [false] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + 0, + ], + [ + False, + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_arrays_is_valid_passes + # unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_nested_objects_is_invalid_fails + # non-unique array of nested objects is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_non_unique_array_of_more_than_two_integers_is_invalid_fails + # non-unique array of more than two integers is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 1, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_true_is_not_equal_to_one_passes + # true is not equal to one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_objects_are_non_unique_despite_key_order_fails + # objects are non-unique despite key order + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + 1, + "b": + 2, + }, + { + "b": + 2, + "a": + 1, + }, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_unique_array_of_strings_is_valid_passes + # unique array of strings is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + "foo", + "bar", + "baz", + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_1_and_true_are_unique_passes + # [1] and [true] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + 1, + ], + [ + True, + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_different_objects_are_unique_passes + # different objects are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + 1, + "b": + 2, + }, + { + "a": + 2, + "b": + 1, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_integers_is_valid_passes + # unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_more_than_two_arrays_is_invalid_fails + # non-unique array of more than two arrays is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + [ + "foo", + ], + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_non_unique_array_of_objects_is_invalid_fails + # non-unique array of objects is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "bar", + }, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_unique_array_of_nested_objects_is_valid_passes + # unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + False, + }, + }, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_arrays_is_invalid_fails + # non-unique array of arrays is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "foo", + ], + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_non_unique_array_of_strings_is_invalid_fails + # non-unique array of strings is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + "foo", + "bar", + "foo", + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_nested1_and_true_are_unique_passes + # nested [1] and [true] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 1, + ], + "foo", + ], + [ + [ + True, + ], + "foo", + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_heterogeneous_types_are_valid_passes + # unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + 1, + "{}", + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_integers_is_invalid_fails + # non-unique array of integers is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 1, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + + + def test_post_uniqueitems_validation_response_body_for_content_types(self): + """Test case for post_uniqueitems_validation_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_uniqueitems_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_unique_array_of_objects_is_valid_passes + # unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "baz", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_true_and_a1_are_unique_passes + # {"a": true} and {"a": 1} are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + True, + }, + { + "a": + 1, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_heterogeneous_types_are_invalid_fails + # non-unique heterogeneous types are invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + { + }, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_nested0_and_false_are_unique_passes + # nested [0] and [false] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 0, + ], + "foo", + ], + [ + [ + False, + ], + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_false_and_a0_are_unique_passes + # {"a": false} and {"a": 0} are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + False, + }, + { + "a": + 0, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_numbers_are_unique_if_mathematically_unequal_fails + # numbers are unique if mathematically unequal + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1.0, + 1.0, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_false_is_not_equal_to_zero_passes + # false is not equal to zero + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_0_and_false_are_unique_passes + # [0] and [false] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + 0, + ], + [ + False, + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_arrays_is_valid_passes + # unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_nested_objects_is_invalid_fails + # non-unique array of nested objects is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_non_unique_array_of_more_than_two_integers_is_invalid_fails + # non-unique array of more than two integers is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_not_equal_to_one_passes + # true is not equal to one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_objects_are_non_unique_despite_key_order_fails + # objects are non-unique despite key order + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + 1, + "b": + 2, + }, + { + "b": + 2, + "a": + 1, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_unique_array_of_strings_is_valid_passes + # unique array of strings is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + "foo", + "bar", + "baz", + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_1_and_true_are_unique_passes + # [1] and [true] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + 1, + ], + [ + True, + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_different_objects_are_unique_passes + # different objects are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + 1, + "b": + 2, + }, + { + "a": + 2, + "b": + 1, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_integers_is_valid_passes + # unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_more_than_two_arrays_is_invalid_fails + # non-unique array of more than two arrays is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + [ + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_non_unique_array_of_objects_is_invalid_fails + # non-unique array of objects is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "bar", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_unique_array_of_nested_objects_is_valid_passes + # unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + False, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_arrays_is_invalid_fails + # non-unique array of arrays is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_non_unique_array_of_strings_is_invalid_fails + # non-unique array of strings is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + "foo", + "bar", + "foo", + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_nested1_and_true_are_unique_passes + # nested [1] and [true] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 1, + ], + "foo", + ], + [ + [ + True, + ], + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_heterogeneous_types_are_valid_passes + # unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + 1, + "{}", + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_integers_is_invalid_fails + # non-unique array of integers is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_uri_format_request_body(self): + """Test case for post_uri_format_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_uri_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_uri_format_response_body_for_content_types(self): + """Test case for post_uri_format_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_uri_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_uri_reference_format_request_body(self): + """Test case for post_uri_reference_format_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_uri_reference_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_uri_reference_format_response_body_for_content_types(self): + """Test case for post_uri_reference_format_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_uri_reference_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_uri_template_format_request_body(self): + """Test case for post_uri_template_format_request_body + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_uri_template_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_uri_template_format_response_body_for_content_types(self): + """Test case for post_uri_template_format_response_body_for_content_types + + """ + from unit_test_api.api.content_type_json_api_endpoints import post_uri_template_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_invalid_instance_should_not_raise_error_when_float_division_inf.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_invalid_instance_should_not_raise_error_when_float_division_inf.py index 67ce05d42f6..e2b83a32ec0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_invalid_instance_should_not_raise_error_when_float_division_inf.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_invalid_instance_should_not_raise_error_when_float_division_inf.py @@ -28,6 +28,13 @@ class TestInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(unittest.TestCa _configuration=self._configuration ) + def test_valid_integer_with_multipleof_float_passes(self): + # valid integer with multipleOf float + InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf._from_openapi_data( + 123456789, + _configuration=self._configuration + ) + if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_json_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_json_api.py deleted file mode 100644 index 0a5f1e58a4c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_json_api.py +++ /dev/null @@ -1,10585 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.api.json_api import JsonApi # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from . import ApiTestMixin - - -class TestJsonApi(ApiTestMixin, unittest.TestCase): - """JsonApi unit test stubs""" - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = JsonApi(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - def test_post_additionalproperties_allows_a_schema_which_should_validate_request_body(self): - """Test case for post_additionalproperties_allows_a_schema_which_should_validate_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_additionalproperties_allows_a_schema_which_should_validate_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_no_additional_properties_is_valid_passes - # no additional properties is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_additional_invalid_property_is_invalid_fails - # an additional invalid property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - 12, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - 2, - "quux": - 12, - }, - _configuration=self._configuration - ) - self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body(body=body) - - # test_an_additional_valid_property_is_valid_passes - # an additional valid property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - True, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_additionalproperties_are_allowed_by_default_request_body(self): - """Test case for post_additionalproperties_are_allowed_by_default_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_additionalproperties_are_allowed_by_default_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_additional_properties_are_allowed_passes - # additional properties are allowed - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - True, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_additionalproperties_are_allowed_by_default_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_additionalproperties_can_exist_by_itself_request_body(self): - """Test case for post_additionalproperties_can_exist_by_itself_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_additionalproperties_can_exist_by_itself_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_an_additional_invalid_property_is_invalid_fails - # an additional invalid property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - }, - _configuration=self._configuration - ) - self.api.post_additionalproperties_can_exist_by_itself_request_body(body=body) - - # test_an_additional_valid_property_is_valid_passes - # an additional valid property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - True, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_additionalproperties_can_exist_by_itself_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_additionalproperties_should_not_look_in_applicators_request_body(self): - """Test case for post_additionalproperties_should_not_look_in_applicators_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_additionalproperties_should_not_look_in_applicators_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_properties_defined_in_allof_are_not_examined_fails - # properties defined in allOf are not examined - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - True, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - True, - }, - _configuration=self._configuration - ) - self.api.post_additionalproperties_should_not_look_in_applicators_request_body(body=body) - - - - def test_post_allof_combined_with_anyof_oneof_request_body(self): - """Test case for post_allof_combined_with_anyof_oneof_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_allof_combined_with_anyof_oneof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_allof_true_anyof_false_oneof_false_fails - # allOf: true, anyOf: false, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 2 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 2, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_false_anyof_false_oneof_true_fails - # allOf: false, anyOf: false, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 5, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_false_anyof_true_oneof_true_fails - # allOf: false, anyOf: true, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 15 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 15, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_true_anyof_true_oneof_false_fails - # allOf: true, anyOf: true, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 6 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 6, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_true_anyof_true_oneof_true_passes - # allOf: true, anyOf: true, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 30 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_combined_with_anyof_oneof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofCombinedWithAnyofOneofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_allof_true_anyof_false_oneof_true_fails - # allOf: true, anyOf: false, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 10 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 10, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_false_anyof_true_oneof_false_fails - # allOf: false, anyOf: true, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_false_anyof_false_oneof_false_fails - # allOf: false, anyOf: false, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - - - def test_post_allof_request_body(self): - """Test case for post_allof_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_allof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_allof_passes - # allOf - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_mismatch_first_fails - # mismatch first - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 2, - }, - _configuration=self._configuration - ) - self.api.post_allof_request_body(body=body) - - # test_mismatch_second_fails - # mismatch second - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "baz", - }, - _configuration=self._configuration - ) - self.api.post_allof_request_body(body=body) - - # test_wrong_type_fails - # wrong type - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - "bar": - "quux", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "baz", - "bar": - "quux", - }, - _configuration=self._configuration - ) - self.api.post_allof_request_body(body=body) - - - - def test_post_allof_simple_types_request_body(self): - """Test case for post_allof_simple_types_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_allof_simple_types_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_valid_passes - # valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 25 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_simple_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofSimpleTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_mismatch_one_fails - # mismatch one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 35 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 35, - _configuration=self._configuration - ) - self.api.post_allof_simple_types_request_body(body=body) - - - - def test_post_allof_with_base_schema_request_body(self): - """Test case for post_allof_with_base_schema_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_allof_with_base_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_valid_passes - # valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "quux", - "bar": - 2, - "baz": - None, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_with_base_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithBaseSchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_mismatch_first_allof_fails - # mismatch first allOf - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 2, - "baz": - None, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 2, - "baz": - None, - }, - _configuration=self._configuration - ) - self.api.post_allof_with_base_schema_request_body(body=body) - - # test_mismatch_base_schema_fails - # mismatch base schema - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "quux", - "baz": - None, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "quux", - "baz": - None, - }, - _configuration=self._configuration - ) - self.api.post_allof_with_base_schema_request_body(body=body) - - # test_mismatch_both_fails - # mismatch both - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 2, - }, - _configuration=self._configuration - ) - self.api.post_allof_with_base_schema_request_body(body=body) - - # test_mismatch_second_allof_fails - # mismatch second allOf - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "quux", - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "quux", - "bar": - 2, - }, - _configuration=self._configuration - ) - self.api.post_allof_with_base_schema_request_body(body=body) - - - - def test_post_allof_with_one_empty_schema_request_body(self): - """Test case for post_allof_with_one_empty_schema_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_allof_with_one_empty_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_any_data_is_valid_passes - # any data is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_with_one_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithOneEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_allof_with_the_first_empty_schema_request_body(self): - """Test case for post_allof_with_the_first_empty_schema_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_allof_with_the_first_empty_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_string_is_invalid_fails - # string is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_allof_with_the_first_empty_schema_request_body(body=body) - - # test_number_is_valid_passes - # number is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_with_the_first_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithTheFirstEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_allof_with_the_last_empty_schema_request_body(self): - """Test case for post_allof_with_the_last_empty_schema_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_allof_with_the_last_empty_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_string_is_invalid_fails - # string is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_allof_with_the_last_empty_schema_request_body(body=body) - - # test_number_is_valid_passes - # number is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_with_the_last_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithTheLastEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_allof_with_two_empty_schemas_request_body(self): - """Test case for post_allof_with_two_empty_schemas_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_allof_with_two_empty_schemas_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_any_data_is_valid_passes - # any data is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_with_two_empty_schemas_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithTwoEmptySchemasRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_anyof_complex_types_request_body(self): - """Test case for post_anyof_complex_types_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_anyof_complex_types_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_second_anyof_valid_complex_passes - # second anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_complex_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_neither_anyof_valid_complex_fails - # neither anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 2, - "bar": - "quux", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 2, - "bar": - "quux", - }, - _configuration=self._configuration - ) - self.api.post_anyof_complex_types_request_body(body=body) - - # test_both_anyof_valid_complex_passes - # both anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_complex_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_first_anyof_valid_complex_passes - # first anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_complex_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_anyof_request_body(self): - """Test case for post_anyof_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_anyof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_second_anyof_valid_passes - # second anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 2.5 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_neither_anyof_valid_fails - # neither anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.5, - _configuration=self._configuration - ) - self.api.post_anyof_request_body(body=body) - - # test_both_anyof_valid_passes - # both anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_first_anyof_valid_passes - # first anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_anyof_with_base_schema_request_body(self): - """Test case for post_anyof_with_base_schema_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_anyof_with_base_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_one_anyof_valid_passes - # one anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foobar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_with_base_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofWithBaseSchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_both_anyof_invalid_fails - # both anyOf invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_anyof_with_base_schema_request_body(body=body) - - # test_mismatch_base_schema_fails - # mismatch base schema - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, - _configuration=self._configuration - ) - self.api.post_anyof_with_base_schema_request_body(body=body) - - - - def test_post_anyof_with_one_empty_schema_request_body(self): - """Test case for post_anyof_with_one_empty_schema_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_anyof_with_one_empty_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_string_is_valid_passes - # string is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_with_one_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_number_is_valid_passes - # number is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_with_one_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_array_type_matches_arrays_request_body(self): - """Test case for post_array_type_matches_arrays_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_array_type_matches_arrays_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_a_float_is_not_an_array_fails - # a float is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - # test_a_boolean_is_not_an_array_fails - # a boolean is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - # test_null_is_not_an_array_fails - # null is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - # test_an_object_is_not_an_array_fails - # an object is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - # test_a_string_is_not_an_array_fails - # a string is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - # test_an_array_is_an_array_passes - # an array is an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_array_type_matches_arrays_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postArrayTypeMatchesArraysRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_integer_is_not_an_array_fails - # an integer is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - - - def test_post_boolean_type_matches_booleans_request_body(self): - """Test case for post_boolean_type_matches_booleans_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_boolean_type_matches_booleans_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_an_empty_string_is_not_a_boolean_fails - # an empty string is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "", - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_a_float_is_not_a_boolean_fails - # a float is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_null_is_not_a_boolean_fails - # null is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_zero_is_not_a_boolean_fails - # zero is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0, - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_an_array_is_not_a_boolean_fails - # an array is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_a_string_is_not_a_boolean_fails - # a string is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_false_is_a_boolean_passes - # false is a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_boolean_type_matches_booleans_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_integer_is_not_a_boolean_fails - # an integer is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_true_is_a_boolean_passes - # true is a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_boolean_type_matches_booleans_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_object_is_not_a_boolean_fails - # an object is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - - - def test_post_by_int_request_body(self): - """Test case for post_by_int_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_by_int_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_int_by_int_fail_fails - # int by int fail - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 7 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 7, - _configuration=self._configuration - ) - self.api.post_by_int_request_body(body=body) - - # test_int_by_int_passes - # int by int - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 10 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_by_int_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByIntRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_non_numbers_passes - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_by_int_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByIntRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_by_number_request_body(self): - """Test case for post_by_number_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_by_number_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_45_is_multiple_of15_passes - # 4.5 is multiple of 1.5 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 4.5 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_by_number_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByNumberRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_35_is_not_multiple_of15_fails - # 35 is not multiple of 1.5 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 35 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 35, - _configuration=self._configuration - ) - self.api.post_by_number_request_body(body=body) - - # test_zero_is_multiple_of_anything_passes - # zero is multiple of anything - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_by_number_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByNumberRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_by_small_number_request_body(self): - """Test case for post_by_small_number_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_by_small_number_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_000751_is_not_multiple_of00001_fails - # 0.00751 is not multiple of 0.0001 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0.00751 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0.00751, - _configuration=self._configuration - ) - self.api.post_by_small_number_request_body(body=body) - - # test_00075_is_multiple_of00001_passes - # 0.0075 is multiple of 0.0001 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0.0075 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_by_small_number_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postBySmallNumberRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_date_time_format_request_body(self): - """Test case for post_date_time_format_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_date_time_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_email_format_request_body(self): - """Test case for post_email_format_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_email_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_enum_with0_does_not_match_false_request_body(self): - """Test case for post_enum_with0_does_not_match_false_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_enum_with0_does_not_match_false_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_integer_zero_is_valid_passes - # integer zero is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with0_does_not_match_false_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_float_zero_is_valid_passes - # float zero is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with0_does_not_match_false_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_false_is_invalid_fails - # false is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - False, - _configuration=self._configuration - ) - self.api.post_enum_with0_does_not_match_false_request_body(body=body) - - - - def test_post_enum_with1_does_not_match_true_request_body(self): - """Test case for post_enum_with1_does_not_match_true_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_enum_with1_does_not_match_true_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_true_is_invalid_fails - # true is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_enum_with1_does_not_match_true_request_body(body=body) - - # test_integer_one_is_valid_passes - # integer one is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with1_does_not_match_true_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_float_one_is_valid_passes - # float one is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with1_does_not_match_true_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_enum_with_escaped_characters_request_body(self): - """Test case for post_enum_with_escaped_characters_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_enum_with_escaped_characters_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_member2_is_valid_passes - # member 2 is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo\rbar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with_escaped_characters_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_member1_is_valid_passes - # member 1 is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo\nbar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with_escaped_characters_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_another_string_is_invalid_fails - # another string is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "abc" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "abc", - _configuration=self._configuration - ) - self.api.post_enum_with_escaped_characters_request_body(body=body) - - - - def test_post_enum_with_false_does_not_match0_request_body(self): - """Test case for post_enum_with_false_does_not_match0_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_enum_with_false_does_not_match0_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_false_is_valid_passes - # false is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with_false_does_not_match0_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithFalseDoesNotMatch0RequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_float_zero_is_invalid_fails - # float zero is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0.0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0.0, - _configuration=self._configuration - ) - self.api.post_enum_with_false_does_not_match0_request_body(body=body) - - # test_integer_zero_is_invalid_fails - # integer zero is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0, - _configuration=self._configuration - ) - self.api.post_enum_with_false_does_not_match0_request_body(body=body) - - - - def test_post_enum_with_true_does_not_match1_request_body(self): - """Test case for post_enum_with_true_does_not_match1_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_enum_with_true_does_not_match1_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_float_one_is_invalid_fails - # float one is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.0, - _configuration=self._configuration - ) - self.api.post_enum_with_true_does_not_match1_request_body(body=body) - - # test_true_is_valid_passes - # true is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with_true_does_not_match1_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithTrueDoesNotMatch1RequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_integer_one_is_invalid_fails - # integer one is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_enum_with_true_does_not_match1_request_body(body=body) - - - - def test_post_enums_in_properties_request_body(self): - """Test case for post_enums_in_properties_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_enums_in_properties_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_missing_optional_property_is_valid_passes - # missing optional property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - "bar", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enums_in_properties_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_wrong_foo_value_fails - # wrong foo value - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "foot", - "bar": - "bar", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "foot", - "bar": - "bar", - }, - _configuration=self._configuration - ) - self.api.post_enums_in_properties_request_body(body=body) - - # test_both_properties_are_valid_passes - # both properties are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "foo", - "bar": - "bar", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enums_in_properties_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_wrong_bar_value_fails - # wrong bar value - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "foo", - "bar": - "bart", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "foo", - "bar": - "bart", - }, - _configuration=self._configuration - ) - self.api.post_enums_in_properties_request_body(body=body) - - # test_missing_all_properties_is_invalid_fails - # missing all properties is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_enums_in_properties_request_body(body=body) - - # test_missing_required_property_is_invalid_fails - # missing required property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "foo", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "foo", - }, - _configuration=self._configuration - ) - self.api.post_enums_in_properties_request_body(body=body) - - - - def test_post_forbidden_property_request_body(self): - """Test case for post_forbidden_property_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_forbidden_property_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_present_fails - # property present - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - 2, - }, - _configuration=self._configuration - ) - self.api.post_forbidden_property_request_body(body=body) - - # test_property_absent_passes - # property absent - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 1, - "baz": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_forbidden_property_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postForbiddenPropertyRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_hostname_format_request_body(self): - """Test case for post_hostname_format_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_hostname_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_integer_type_matches_integers_request_body(self): - """Test case for post_integer_type_matches_integers_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_integer_type_matches_integers_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_an_object_is_not_an_integer_fails - # an object is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_a_string_is_not_an_integer_fails - # a string is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_null_is_not_an_integer_fails - # null is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_a_float_with_zero_fractional_part_is_an_integer_passes - # a float with zero fractional part is an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_integer_type_matches_integers_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_float_is_not_an_integer_fails - # a float is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_a_boolean_is_not_an_integer_fails - # a boolean is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_an_integer_is_an_integer_passes - # an integer is an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_integer_type_matches_integers_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails - # a string is still not an integer, even if it looks like one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "1" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "1", - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_an_array_is_not_an_integer_fails - # an array is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - - - def test_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(self): - """Test case for post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails - # always invalid, but naive implementations may raise an overflow error - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0E308 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.0E308, - _configuration=self._configuration - ) - self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body=body) - - - - def test_post_invalid_string_value_for_default_request_body(self): - """Test case for post_invalid_string_value_for_default_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_invalid_string_value_for_default_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_valid_when_property_is_specified_passes - # valid when property is specified - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - "good", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_invalid_string_value_for_default_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_still_valid_when_the_invalid_default_is_used_passes - # still valid when the invalid default is used - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_invalid_string_value_for_default_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_ipv4_format_request_body(self): - """Test case for post_ipv4_format_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_ipv4_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_ipv6_format_request_body(self): - """Test case for post_ipv6_format_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_ipv6_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_json_pointer_format_request_body(self): - """Test case for post_json_pointer_format_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_json_pointer_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_maximum_validation_request_body(self): - """Test case for post_maximum_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_maximum_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_below_the_maximum_is_valid_passes - # below the maximum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 2.6 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_boundary_point_is_valid_passes - # boundary point is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_above_the_maximum_is_invalid_fails - # above the maximum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3.5, - _configuration=self._configuration - ) - self.api.post_maximum_validation_request_body(body=body) - - # test_ignores_non_numbers_passes - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "x" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_maximum_validation_with_unsigned_integer_request_body(self): - """Test case for post_maximum_validation_with_unsigned_integer_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_maximum_validation_with_unsigned_integer_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_below_the_maximum_is_invalid_passes - # below the maximum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 299.97 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_above_the_maximum_is_invalid_fails - # above the maximum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 300.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 300.5, - _configuration=self._configuration - ) - self.api.post_maximum_validation_with_unsigned_integer_request_body(body=body) - - # test_boundary_point_integer_is_valid_passes - # boundary point integer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 300 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_boundary_point_float_is_valid_passes - # boundary point float is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 300.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_maxitems_validation_request_body(self): - """Test case for post_maxitems_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_maxitems_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_too_long_is_invalid_fails - # too long is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - 3, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1, - 2, - 3, - ], - _configuration=self._configuration - ) - self.api.post_maxitems_validation_request_body(body=body) - - # test_ignores_non_arrays_passes - # ignores non-arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foobar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_shorter_is_valid_passes - # shorter is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_maxlength_validation_request_body(self): - """Test case for post_maxlength_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_maxlength_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_too_long_is_invalid_fails - # too long is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_maxlength_validation_request_body(body=body) - - # test_ignores_non_strings_passes - # ignores non-strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 100 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_shorter_is_valid_passes - # shorter is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "f" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_two_supplementary_unicode_code_points_is_long_enough_passes - # two supplementary Unicode code points is long enough - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "💩💩" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "fo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_maxproperties0_means_the_object_is_empty_request_body(self): - """Test case for post_maxproperties0_means_the_object_is_empty_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_maxproperties0_means_the_object_is_empty_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_no_properties_is_valid_passes - # no properties is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties0_means_the_object_is_empty_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_one_property_is_invalid_fails - # one property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - }, - _configuration=self._configuration - ) - self.api.post_maxproperties0_means_the_object_is_empty_request_body(body=body) - - - - def test_post_maxproperties_validation_request_body(self): - """Test case for post_maxproperties_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_maxproperties_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_too_long_is_invalid_fails - # too long is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - "baz": - 3, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - 2, - "baz": - 3, - }, - _configuration=self._configuration - ) - self.api.post_maxproperties_validation_request_body(body=body) - - # test_ignores_arrays_passes - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - 3, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_other_non_objects_passes - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_strings_passes - # ignores strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foobar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_shorter_is_valid_passes - # shorter is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_minimum_validation_request_body(self): - """Test case for post_minimum_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_minimum_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_boundary_point_is_valid_passes - # boundary point is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_below_the_minimum_is_invalid_fails - # below the minimum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0.6 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0.6, - _configuration=self._configuration - ) - self.api.post_minimum_validation_request_body(body=body) - - # test_above_the_minimum_is_valid_passes - # above the minimum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 2.6 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_non_numbers_passes - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "x" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_minimum_validation_with_signed_integer_request_body(self): - """Test case for post_minimum_validation_with_signed_integer_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_minimum_validation_with_signed_integer_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_boundary_point_is_valid_passes - # boundary point is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - -2 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_with_signed_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_positive_above_the_minimum_is_valid_passes - # positive above the minimum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_with_signed_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_int_below_the_minimum_is_invalid_fails - # int below the minimum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - -3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - -3, - _configuration=self._configuration - ) - self.api.post_minimum_validation_with_signed_integer_request_body(body=body) - - # test_float_below_the_minimum_is_invalid_fails - # float below the minimum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - -2.0001 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - -2.0001, - _configuration=self._configuration - ) - self.api.post_minimum_validation_with_signed_integer_request_body(body=body) - - # test_boundary_point_with_float_is_valid_passes - # boundary point with float is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - -2.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_with_signed_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_negative_above_the_minimum_is_valid_passes - # negative above the minimum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - -1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_with_signed_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_non_numbers_passes - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "x" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_with_signed_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_minitems_validation_request_body(self): - """Test case for post_minitems_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_minitems_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_too_short_is_invalid_fails - # too short is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_minitems_validation_request_body(body=body) - - # test_ignores_non_arrays_passes - # ignores non-arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_longer_is_valid_passes - # longer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_minlength_validation_request_body(self): - """Test case for post_minlength_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_minlength_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_too_short_is_invalid_fails - # too short is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "f" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "f", - _configuration=self._configuration - ) - self.api.post_minlength_validation_request_body(body=body) - - # test_one_supplementary_unicode_code_point_is_not_long_enough_fails - # one supplementary Unicode code point is not long enough - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "💩" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "💩", - _configuration=self._configuration - ) - self.api.post_minlength_validation_request_body(body=body) - - # test_longer_is_valid_passes - # longer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_non_strings_passes - # ignores non-strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "fo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_minproperties_validation_request_body(self): - """Test case for post_minproperties_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_minproperties_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_ignores_arrays_passes - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_other_non_objects_passes - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_too_short_is_invalid_fails - # too short is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_minproperties_validation_request_body(body=body) - - # test_ignores_strings_passes - # ignores strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_longer_is_valid_passes - # longer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_nested_allof_to_check_validation_semantics_request_body(self): - """Test case for post_nested_allof_to_check_validation_semantics_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_nested_allof_to_check_validation_semantics_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_anything_non_null_is_invalid_fails - # anything non-null is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, - _configuration=self._configuration - ) - self.api.post_nested_allof_to_check_validation_semantics_request_body(body=body) - - # test_null_is_valid_passes - # null is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_nested_allof_to_check_validation_semantics_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_nested_anyof_to_check_validation_semantics_request_body(self): - """Test case for post_nested_anyof_to_check_validation_semantics_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_nested_anyof_to_check_validation_semantics_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_anything_non_null_is_invalid_fails - # anything non-null is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, - _configuration=self._configuration - ) - self.api.post_nested_anyof_to_check_validation_semantics_request_body(body=body) - - # test_null_is_valid_passes - # null is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_nested_anyof_to_check_validation_semantics_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_nested_items_request_body(self): - """Test case for post_nested_items_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_nested_items_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_valid_nested_array_passes - # valid nested array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - [ - [ - 1, - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_nested_items_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedItemsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_nested_array_with_invalid_type_fails - # nested array with invalid type - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - [ - [ - "1", - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - [ - [ - "1", - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ], - _configuration=self._configuration - ) - self.api.post_nested_items_request_body(body=body) - - # test_not_deep_enough_fails - # not deep enough - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - [ - 1, - ], - [ - 2, - ], - [ - 3, - ], - ], - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - [ - 1, - ], - [ - 2, - ], - [ - 3, - ], - ], - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - _configuration=self._configuration - ) - self.api.post_nested_items_request_body(body=body) - - - - def test_post_nested_oneof_to_check_validation_semantics_request_body(self): - """Test case for post_nested_oneof_to_check_validation_semantics_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_nested_oneof_to_check_validation_semantics_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_anything_non_null_is_invalid_fails - # anything non-null is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, - _configuration=self._configuration - ) - self.api.post_nested_oneof_to_check_validation_semantics_request_body(body=body) - - # test_null_is_valid_passes - # null is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_nested_oneof_to_check_validation_semantics_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_not_more_complex_schema_request_body(self): - """Test case for post_not_more_complex_schema_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_not_more_complex_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_other_match_passes - # other match - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_not_more_complex_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_mismatch_fails - # mismatch - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "bar", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "bar", - }, - _configuration=self._configuration - ) - self.api.post_not_more_complex_schema_request_body(body=body) - - # test_match_passes - # match - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_not_more_complex_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_not_request_body(self): - """Test case for post_not_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_not_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_allowed_passes - # allowed - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_not_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNotRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_disallowed_fails - # disallowed - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_not_request_body(body=body) - - - - def test_post_nul_characters_in_strings_request_body(self): - """Test case for post_nul_characters_in_strings_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_nul_characters_in_strings_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_match_string_with_nul_passes - # match string with nul - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "hello\x00there" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_nul_characters_in_strings_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNulCharactersInStringsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_do_not_match_string_lacking_nul_fails - # do not match string lacking nul - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "hellothere" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "hellothere", - _configuration=self._configuration - ) - self.api.post_nul_characters_in_strings_request_body(body=body) - - - - def test_post_null_type_matches_only_the_null_object_request_body(self): - """Test case for post_null_type_matches_only_the_null_object_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_null_type_matches_only_the_null_object_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_a_float_is_not_null_fails - # a float is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_an_object_is_not_null_fails - # an object is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_false_is_not_null_fails - # false is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - False, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_an_integer_is_not_null_fails - # an integer is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_true_is_not_null_fails - # true is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_zero_is_not_null_fails - # zero is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_an_empty_string_is_not_null_fails - # an empty string is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "", - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_null_is_null_passes - # null is null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_null_type_matches_only_the_null_object_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_array_is_not_null_fails - # an array is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_a_string_is_not_null_fails - # a string is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - - - def test_post_number_type_matches_numbers_request_body(self): - """Test case for post_number_type_matches_numbers_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_number_type_matches_numbers_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_an_array_is_not_a_number_fails - # an array is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_null_is_not_a_number_fails - # null is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_an_object_is_not_a_number_fails - # an object is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_a_boolean_is_not_a_number_fails - # a boolean is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_a_float_is_a_number_passes - # a float is a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_number_type_matches_numbers_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails - # a string is still not a number, even if it looks like one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "1" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "1", - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_a_string_is_not_a_number_fails - # a string is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_an_integer_is_a_number_passes - # an integer is a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_number_type_matches_numbers_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes - # a float with zero fractional part is a number (and an integer) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_number_type_matches_numbers_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_object_properties_validation_request_body(self): - """Test case for post_object_properties_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_object_properties_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_ignores_arrays_passes - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_object_properties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_other_non_objects_passes - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_object_properties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_one_property_invalid_is_invalid_fails - # one property invalid is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - { - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - { - }, - }, - _configuration=self._configuration - ) - self.api.post_object_properties_validation_request_body(body=body) - - # test_both_properties_present_and_valid_is_valid_passes - # both properties present and valid is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - "baz", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_object_properties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_doesn_t_invalidate_other_properties_passes - # doesn't invalidate other properties - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "quux": - [ - ], - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_object_properties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_both_properties_invalid_is_invalid_fails - # both properties invalid is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - [ - ], - "bar": - { - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - [ - ], - "bar": - { - }, - }, - _configuration=self._configuration - ) - self.api.post_object_properties_validation_request_body(body=body) - - - - def test_post_object_type_matches_objects_request_body(self): - """Test case for post_object_type_matches_objects_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_object_type_matches_objects_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_a_float_is_not_an_object_fails - # a float is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - # test_null_is_not_an_object_fails - # null is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - # test_an_array_is_not_an_object_fails - # an array is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - # test_an_object_is_an_object_passes - # an object is an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_object_type_matches_objects_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectTypeMatchesObjectsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_string_is_not_an_object_fails - # a string is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - # test_an_integer_is_not_an_object_fails - # an integer is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - # test_a_boolean_is_not_an_object_fails - # a boolean is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - - - def test_post_oneof_complex_types_request_body(self): - """Test case for post_oneof_complex_types_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_oneof_complex_types_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_first_oneof_valid_complex_passes - # first oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_complex_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_neither_oneof_valid_complex_fails - # neither oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 2, - "bar": - "quux", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 2, - "bar": - "quux", - }, - _configuration=self._configuration - ) - self.api.post_oneof_complex_types_request_body(body=body) - - # test_both_oneof_valid_complex_fails - # both oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "baz", - "bar": - 2, - }, - _configuration=self._configuration - ) - self.api.post_oneof_complex_types_request_body(body=body) - - # test_second_oneof_valid_complex_passes - # second oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_complex_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_oneof_request_body(self): - """Test case for post_oneof_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_oneof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_second_oneof_valid_passes - # second oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 2.5 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_both_oneof_valid_fails - # both oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, - _configuration=self._configuration - ) - self.api.post_oneof_request_body(body=body) - - # test_first_oneof_valid_passes - # first oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_neither_oneof_valid_fails - # neither oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.5, - _configuration=self._configuration - ) - self.api.post_oneof_request_body(body=body) - - - - def test_post_oneof_with_base_schema_request_body(self): - """Test case for post_oneof_with_base_schema_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_oneof_with_base_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_both_oneof_valid_fails - # both oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_oneof_with_base_schema_request_body(body=body) - - # test_mismatch_base_schema_fails - # mismatch base schema - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, - _configuration=self._configuration - ) - self.api.post_oneof_with_base_schema_request_body(body=body) - - # test_one_oneof_valid_passes - # one oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foobar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_with_base_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofWithBaseSchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_oneof_with_empty_schema_request_body(self): - """Test case for post_oneof_with_empty_schema_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_oneof_with_empty_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_both_valid_invalid_fails - # both valid - invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, - _configuration=self._configuration - ) - self.api.post_oneof_with_empty_schema_request_body(body=body) - - # test_one_valid_valid_passes - # one valid - valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_with_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofWithEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_pattern_is_not_anchored_request_body(self): - """Test case for post_pattern_is_not_anchored_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_pattern_is_not_anchored_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_matches_a_substring_passes - # matches a substring - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "xxaayy" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_is_not_anchored_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternIsNotAnchoredRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_pattern_validation_request_body(self): - """Test case for post_pattern_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_pattern_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_ignores_arrays_passes - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_objects_passes - # ignores objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_null_passes - # ignores null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_floats_passes - # ignores floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_non_matching_pattern_is_invalid_fails - # a non-matching pattern is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "abc" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "abc", - _configuration=self._configuration - ) - self.api.post_pattern_validation_request_body(body=body) - - # test_ignores_booleans_passes - # ignores booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_matching_pattern_is_valid_passes - # a matching pattern is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "aaa" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_integers_passes - # ignores integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_properties_with_escaped_characters_request_body(self): - """Test case for post_properties_with_escaped_characters_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_properties_with_escaped_characters_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_object_with_all_numbers_is_valid_passes - # object with all numbers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo\nbar": - 1, - "foo\"bar": - 1, - "foo\\bar": - 1, - "foo\rbar": - 1, - "foo\tbar": - 1, - "foo\fbar": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_properties_with_escaped_characters_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPropertiesWithEscapedCharactersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_object_with_strings_is_invalid_fails - # object with strings is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo\nbar": - "1", - "foo\"bar": - "1", - "foo\\bar": - "1", - "foo\rbar": - "1", - "foo\tbar": - "1", - "foo\fbar": - "1", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo\nbar": - "1", - "foo\"bar": - "1", - "foo\\bar": - "1", - "foo\rbar": - "1", - "foo\tbar": - "1", - "foo\fbar": - "1", - }, - _configuration=self._configuration - ) - self.api.post_properties_with_escaped_characters_request_body(body=body) - - - - def test_post_property_named_ref_that_is_not_a_reference_request_body(self): - """Test case for post_property_named_ref_that_is_not_a_reference_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_property_named_ref_that_is_not_a_reference_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - "a", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_property_named_ref_that_is_not_a_reference_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - self.api.post_property_named_ref_that_is_not_a_reference_request_body(body=body) - - - - def test_post_ref_in_additionalproperties_request_body(self): - """Test case for post_ref_in_additionalproperties_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_ref_in_additionalproperties_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "someProp": - { - "$ref": - "a", - }, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_additionalproperties_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInAdditionalpropertiesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "someProp": - { - "$ref": - 2, - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "someProp": - { - "$ref": - 2, - }, - }, - _configuration=self._configuration - ) - self.api.post_ref_in_additionalproperties_request_body(body=body) - - - - def test_post_ref_in_allof_request_body(self): - """Test case for post_ref_in_allof_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_ref_in_allof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - "a", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_allof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInAllofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - self.api.post_ref_in_allof_request_body(body=body) - - - - def test_post_ref_in_anyof_request_body(self): - """Test case for post_ref_in_anyof_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_ref_in_anyof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - "a", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_anyof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInAnyofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - self.api.post_ref_in_anyof_request_body(body=body) - - - - def test_post_ref_in_items_request_body(self): - """Test case for post_ref_in_items_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_ref_in_items_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "$ref": - "a", - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_items_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInItemsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "$ref": - 2, - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "$ref": - 2, - }, - ], - _configuration=self._configuration - ) - self.api.post_ref_in_items_request_body(body=body) - - - - def test_post_ref_in_oneof_request_body(self): - """Test case for post_ref_in_oneof_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_ref_in_oneof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - "a", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_oneof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInOneofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - self.api.post_ref_in_oneof_request_body(body=body) - - - - def test_post_ref_in_property_request_body(self): - """Test case for post_ref_in_property_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_ref_in_property_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "a": - { - "$ref": - "a", - }, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_property_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInPropertyRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "a": - { - "$ref": - 2, - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "a": - { - "$ref": - 2, - }, - }, - _configuration=self._configuration - ) - self.api.post_ref_in_property_request_body(body=body) - - - - def test_post_required_default_validation_request_body(self): - """Test case for post_required_default_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_required_default_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_not_required_by_default_passes - # not required by default - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_default_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredDefaultValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_required_validation_request_body(self): - """Test case for post_required_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_required_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_ignores_arrays_passes - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_present_required_property_is_valid_passes - # present required property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_other_non_objects_passes - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_strings_passes - # ignores strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_present_required_property_is_invalid_fails - # non-present required property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 1, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 1, - }, - _configuration=self._configuration - ) - self.api.post_required_validation_request_body(body=body) - - - - def test_post_required_with_empty_array_request_body(self): - """Test case for post_required_with_empty_array_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_required_with_empty_array_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_not_required_passes - # property not required - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_with_empty_array_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredWithEmptyArrayRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_simple_enum_validation_request_body(self): - """Test case for post_simple_enum_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_simple_enum_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_something_else_is_invalid_fails - # something else is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 4 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 4, - _configuration=self._configuration - ) - self.api.post_simple_enum_validation_request_body(body=body) - - # test_one_of_the_enum_is_valid_passes - # one of the enum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_simple_enum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postSimpleEnumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_string_type_matches_strings_request_body(self): - """Test case for post_string_type_matches_strings_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_string_type_matches_strings_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_1_is_not_a_string_fails - # 1 is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes - # a string is still a string, even if it looks like a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "1" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_string_type_matches_strings_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_empty_string_is_still_a_string_passes - # an empty string is still a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_string_type_matches_strings_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_float_is_not_a_string_fails - # a float is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_an_object_is_not_a_string_fails - # an object is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_an_array_is_not_a_string_fails - # an array is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_a_boolean_is_not_a_string_fails - # a boolean is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_null_is_not_a_string_fails - # null is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_a_string_is_a_string_passes - # a string is a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_string_type_matches_strings_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(self): - """Test case for post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_missing_properties_are_not_filled_in_with_the_default_passes - # missing properties are not filled in with the default - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_explicit_property_value_is_checked_against_maximum_passing_passes - # an explicit property value is checked against maximum (passing) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "alpha": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_explicit_property_value_is_checked_against_maximum_failing_fails - # an explicit property value is checked against maximum (failing) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "alpha": - 5, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "alpha": - 5, - }, - _configuration=self._configuration - ) - self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(body=body) - - - - def test_post_uniqueitems_false_validation_request_body(self): - """Test case for post_uniqueitems_false_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_uniqueitems_false_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_non_unique_array_of_integers_is_valid_passes - # non-unique array of integers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_objects_is_valid_passes - # unique array of objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "baz", - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_nested_objects_is_valid_passes - # non-unique array of nested objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_objects_is_valid_passes - # non-unique array of objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_1_and_true_are_unique_passes - # 1 and true are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - True, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_integers_is_valid_passes - # unique array of integers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_arrays_is_valid_passes - # non-unique array of arrays is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - "foo", - ], - [ - "foo", - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_numbers_are_unique_if_mathematically_unequal_passes - # numbers are unique if mathematically unequal - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1.0, - 1.0, - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_false_is_not_equal_to_zero_passes - # false is not equal to zero - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 0, - False, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_nested_objects_is_valid_passes - # unique array of nested objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - False, - }, - }, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_0_and_false_are_unique_passes - # 0 and false are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 0, - False, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_arrays_is_valid_passes - # unique array of arrays is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_true_is_not_equal_to_one_passes - # true is not equal to one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - True, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_heterogeneous_types_are_valid_passes - # non-unique heterogeneous types are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_heterogeneous_types_are_valid_passes - # unique heterogeneous types are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_uniqueitems_validation_request_body(self): - """Test case for post_uniqueitems_validation_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_uniqueitems_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_unique_array_of_objects_is_valid_passes - # unique array of objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "baz", - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_true_and_a1_are_unique_passes - # {"a": true} and {"a": 1} are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "a": - True, - }, - { - "a": - 1, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_heterogeneous_types_are_invalid_fails - # non-unique heterogeneous types are invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_nested0_and_false_are_unique_passes - # nested [0] and [false] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - [ - 0, - ], - "foo", - ], - [ - [ - False, - ], - "foo", - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_false_and_a0_are_unique_passes - # {"a": false} and {"a": 0} are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "a": - False, - }, - { - "a": - 0, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_numbers_are_unique_if_mathematically_unequal_fails - # numbers are unique if mathematically unequal - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1.0, - 1.0, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1.0, - 1.0, - 1, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_false_is_not_equal_to_zero_passes - # false is not equal to zero - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 0, - False, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_0_and_false_are_unique_passes - # [0] and [false] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - 0, - ], - [ - False, - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_arrays_is_valid_passes - # unique array of arrays is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_nested_objects_is_invalid_fails - # non-unique array of nested objects is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_non_unique_array_of_more_than_two_integers_is_invalid_fails - # non-unique array of more than two integers is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1, - 2, - 1, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_true_is_not_equal_to_one_passes - # true is not equal to one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - True, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_objects_are_non_unique_despite_key_order_fails - # objects are non-unique despite key order - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "a": - 1, - "b": - 2, - }, - { - "b": - 2, - "a": - 1, - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "a": - 1, - "b": - 2, - }, - { - "b": - 2, - "a": - 1, - }, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_unique_array_of_strings_is_valid_passes - # unique array of strings is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - "foo", - "bar", - "baz", - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_1_and_true_are_unique_passes - # [1] and [true] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - 1, - ], - [ - True, - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_different_objects_are_unique_passes - # different objects are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "a": - 1, - "b": - 2, - }, - { - "a": - 2, - "b": - 1, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_integers_is_valid_passes - # unique array of integers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_more_than_two_arrays_is_invalid_fails - # non-unique array of more than two arrays is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - [ - "foo", - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - "foo", - ], - [ - "bar", - ], - [ - "foo", - ], - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_non_unique_array_of_objects_is_invalid_fails - # non-unique array of objects is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_unique_array_of_nested_objects_is_valid_passes - # unique array of nested objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - False, - }, - }, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_arrays_is_invalid_fails - # non-unique array of arrays is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - "foo", - ], - [ - "foo", - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - "foo", - ], - [ - "foo", - ], - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_non_unique_array_of_strings_is_invalid_fails - # non-unique array of strings is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - "foo", - "bar", - "foo", - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - "foo", - "bar", - "foo", - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_nested1_and_true_are_unique_passes - # nested [1] and [true] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - [ - 1, - ], - "foo", - ], - [ - [ - True, - ], - "foo", - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_heterogeneous_types_are_valid_passes - # unique heterogeneous types are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - 1, - "{}", - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_integers_is_invalid_fails - # non-unique array of integers is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1, - 1, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - - - def test_post_uri_format_request_body(self): - """Test case for post_uri_format_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_uri_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_uri_reference_format_request_body(self): - """Test case for post_uri_reference_format_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_uri_reference_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_uri_template_format_request_body(self): - """Test case for post_uri_template_format_request_body - - """ - from unit_test_api.api.json_api_endpoints import post_uri_template_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_post_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_operation_request_body_api.py similarity index 81% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_post_api.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_operation_request_body_api.py index 7fca42c6ff0..7fcda19fd05 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_post_api.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_operation_request_body_api.py @@ -15,19 +15,19 @@ from unittest.mock import patch import urllib3 import unit_test_api -from unit_test_api.api.post_api import PostApi # noqa: E501 +from unit_test_api.api.operation_request_body_api import OperationRequestBodyApi # noqa: E501 from unit_test_api import configuration, schemas, api_client from . import ApiTestMixin -class TestPostApi(ApiTestMixin, unittest.TestCase): - """PostApi unit test stubs""" +class TestOperationRequestBodyApi(ApiTestMixin, unittest.TestCase): + """OperationRequestBodyApi unit test stubs""" _configuration = configuration.Configuration() def setUp(self): used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = PostApi(api_client=used_api_client) # noqa: E501 + self.api = OperationRequestBodyApi(api_client=used_api_client) # noqa: E501 def tearDown(self): pass @@ -36,7 +36,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_additionalproperties_allows_a_schema_which_should_validate_request_body """ - from unit_test_api.api.post_api_endpoints import post_additionalproperties_allows_a_schema_which_should_validate_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_additionalproperties_allows_a_schema_which_should_validate_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -44,14 +44,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_no_additional_properties_is_valid_passes # no additional properties is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -66,19 +66,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_an_additional_invalid_property_is_invalid_fails # an additional invalid property is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -90,14 +88,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - 2, - "quux": - 12, - }, + payload, _configuration=self._configuration ) self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body(body=body) @@ -105,7 +96,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_additional_valid_property_is_valid_passes # an additional valid property is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -116,7 +107,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -131,13 +122,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -146,7 +135,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_additionalproperties_are_allowed_by_default_request_body """ - from unit_test_api.api.post_api_endpoints import post_additionalproperties_are_allowed_by_default_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_additionalproperties_are_allowed_by_default_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -154,7 +143,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_additional_properties_are_allowed_passes # additional properties are allowed with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -165,7 +154,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -180,13 +169,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -195,7 +182,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_additionalproperties_can_exist_by_itself_request_body """ - from unit_test_api.api.post_api_endpoints import post_additionalproperties_can_exist_by_itself_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_additionalproperties_can_exist_by_itself_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -203,7 +190,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_additional_invalid_property_is_invalid_fails # an additional invalid property is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -211,10 +198,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - }, + payload, _configuration=self._configuration ) self.api.post_additionalproperties_can_exist_by_itself_request_body(body=body) @@ -222,14 +206,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_additional_valid_property_is_valid_passes # an additional valid property is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": True, } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -244,13 +228,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -259,7 +241,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_additionalproperties_should_not_look_in_applicators_request_body """ - from unit_test_api.api.post_api_endpoints import post_additionalproperties_should_not_look_in_applicators_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_additionalproperties_should_not_look_in_applicators_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -267,7 +249,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_properties_defined_in_allof_are_not_examined_fails # properties defined in allOf are not examined with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -277,23 +259,52 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - True, - }, + payload, _configuration=self._configuration ) self.api.post_additionalproperties_should_not_look_in_applicators_request_body(body=body) + # test_valid_test_case_passes + # valid test case + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + False, + "bar": + True, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_additionalproperties_should_not_look_in_applicators_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + def test_post_allof_combined_with_anyof_oneof_request_body(self): """Test case for post_allof_combined_with_anyof_oneof_request_body """ - from unit_test_api.api.post_api_endpoints import post_allof_combined_with_anyof_oneof_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_allof_combined_with_anyof_oneof_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -301,12 +312,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_allof_true_anyof_false_oneof_false_fails # allOf: true, anyOf: false, oneOf: false with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 2 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 2, + payload, _configuration=self._configuration ) self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) @@ -314,12 +325,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_allof_false_anyof_false_oneof_true_fails # allOf: false, anyOf: false, oneOf: true with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 5, + payload, _configuration=self._configuration ) self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) @@ -327,12 +338,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_allof_false_anyof_true_oneof_true_fails # allOf: false, anyOf: true, oneOf: true with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 15 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 15, + payload, _configuration=self._configuration ) self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) @@ -340,12 +351,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_allof_true_anyof_true_oneof_false_fails # allOf: true, anyOf: true, oneOf: false with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 6 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 6, + payload, _configuration=self._configuration ) self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) @@ -353,11 +364,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_allof_true_anyof_true_oneof_true_passes # allOf: true, anyOf: true, oneOf: true with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 30 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -372,24 +383,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAllofCombinedWithAnyofOneofRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_allof_true_anyof_false_oneof_true_fails # allOf: true, anyOf: false, oneOf: true with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 10 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 10, + payload, _configuration=self._configuration ) self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) @@ -397,12 +406,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_allof_false_anyof_true_oneof_false_fails # allOf: false, anyOf: true, oneOf: false with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, + payload, _configuration=self._configuration ) self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) @@ -410,12 +419,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_allof_false_anyof_false_oneof_false_fails # allOf: false, anyOf: false, oneOf: false with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, + payload, _configuration=self._configuration ) self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) @@ -426,7 +435,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_allof_request_body """ - from unit_test_api.api.post_api_endpoints import post_allof_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_allof_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -434,7 +443,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_allof_passes # allOf with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "baz", @@ -443,7 +452,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -458,19 +467,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAllofRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_mismatch_first_fails # mismatch first with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "bar": 2, @@ -478,10 +485,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 2, - }, + payload, _configuration=self._configuration ) self.api.post_allof_request_body(body=body) @@ -489,7 +493,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_mismatch_second_fails # mismatch second with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "baz", @@ -497,10 +501,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "baz", - }, + payload, _configuration=self._configuration ) self.api.post_allof_request_body(body=body) @@ -508,7 +509,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_wrong_type_fails # wrong type with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "baz", @@ -518,12 +519,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "baz", - "bar": - "quux", - }, + payload, _configuration=self._configuration ) self.api.post_allof_request_body(body=body) @@ -534,7 +530,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_allof_simple_types_request_body """ - from unit_test_api.api.post_api_endpoints import post_allof_simple_types_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_allof_simple_types_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -542,11 +538,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_valid_passes # valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 25 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -561,24 +557,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAllofSimpleTypesRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_mismatch_one_fails # mismatch one with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 35 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 35, + payload, _configuration=self._configuration ) self.api.post_allof_simple_types_request_body(body=body) @@ -589,7 +583,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_allof_with_base_schema_request_body """ - from unit_test_api.api.post_api_endpoints import post_allof_with_base_schema_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_allof_with_base_schema_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -597,7 +591,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_valid_passes # valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "quux", @@ -608,7 +602,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -623,19 +617,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAllofWithBaseSchemaRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_mismatch_first_allof_fails # mismatch first allOf with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "bar": 2, @@ -645,12 +637,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 2, - "baz": - None, - }, + payload, _configuration=self._configuration ) self.api.post_allof_with_base_schema_request_body(body=body) @@ -658,7 +645,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_mismatch_base_schema_fails # mismatch base schema with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "quux", @@ -668,12 +655,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "quux", - "baz": - None, - }, + payload, _configuration=self._configuration ) self.api.post_allof_with_base_schema_request_body(body=body) @@ -681,7 +663,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_mismatch_both_fails # mismatch both with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "bar": 2, @@ -689,10 +671,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 2, - }, + payload, _configuration=self._configuration ) self.api.post_allof_with_base_schema_request_body(body=body) @@ -700,7 +679,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_mismatch_second_allof_fails # mismatch second allOf with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "quux", @@ -710,12 +689,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "quux", - "bar": - 2, - }, + payload, _configuration=self._configuration ) self.api.post_allof_with_base_schema_request_body(body=body) @@ -726,7 +700,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_allof_with_one_empty_schema_request_body """ - from unit_test_api.api.post_api_endpoints import post_allof_with_one_empty_schema_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_allof_with_one_empty_schema_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -734,11 +708,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_any_data_is_valid_passes # any data is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -753,13 +727,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAllofWithOneEmptySchemaRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -768,7 +740,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_allof_with_the_first_empty_schema_request_body """ - from unit_test_api.api.post_api_endpoints import post_allof_with_the_first_empty_schema_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_allof_with_the_first_empty_schema_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -776,12 +748,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_string_is_invalid_fails # string is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", + payload, _configuration=self._configuration ) self.api.post_allof_with_the_first_empty_schema_request_body(body=body) @@ -789,11 +761,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_number_is_valid_passes # number is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -808,13 +780,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAllofWithTheFirstEmptySchemaRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -823,7 +793,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_allof_with_the_last_empty_schema_request_body """ - from unit_test_api.api.post_api_endpoints import post_allof_with_the_last_empty_schema_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_allof_with_the_last_empty_schema_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -831,12 +801,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_string_is_invalid_fails # string is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", + payload, _configuration=self._configuration ) self.api.post_allof_with_the_last_empty_schema_request_body(body=body) @@ -844,11 +814,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_number_is_valid_passes # number is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -863,13 +833,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAllofWithTheLastEmptySchemaRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -878,7 +846,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_allof_with_two_empty_schemas_request_body """ - from unit_test_api.api.post_api_endpoints import post_allof_with_two_empty_schemas_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_allof_with_two_empty_schemas_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -886,11 +854,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_any_data_is_valid_passes # any data is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -905,13 +873,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAllofWithTwoEmptySchemasRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -920,7 +886,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_anyof_complex_types_request_body """ - from unit_test_api.api.post_api_endpoints import post_anyof_complex_types_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_anyof_complex_types_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -928,14 +894,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_second_anyof_valid_complex_passes # second anyOf valid (complex) with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "baz", } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -950,19 +916,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_neither_anyof_valid_complex_fails # neither anyOf valid (complex) with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 2, @@ -972,12 +936,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 2, - "bar": - "quux", - }, + payload, _configuration=self._configuration ) self.api.post_anyof_complex_types_request_body(body=body) @@ -985,7 +944,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_both_anyof_valid_complex_passes # both anyOf valid (complex) with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "baz", @@ -994,7 +953,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1009,26 +968,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_first_anyof_valid_complex_passes # first anyOf valid (complex) with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "bar": 2, } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1043,13 +1000,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -1058,7 +1013,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_anyof_request_body """ - from unit_test_api.api.post_api_endpoints import post_anyof_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_anyof_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -1066,11 +1021,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_second_anyof_valid_passes # second anyOf valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 2.5 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1085,24 +1040,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAnyofRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_neither_anyof_valid_fails # neither anyOf valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.5, + payload, _configuration=self._configuration ) self.api.post_anyof_request_body(body=body) @@ -1110,11 +1063,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_both_anyof_valid_passes # both anyOf valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 3 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1129,23 +1082,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAnyofRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_first_anyof_valid_passes # first anyOf valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1160,13 +1111,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAnyofRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -1175,7 +1124,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_anyof_with_base_schema_request_body """ - from unit_test_api.api.post_api_endpoints import post_anyof_with_base_schema_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_anyof_with_base_schema_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -1183,11 +1132,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_one_anyof_valid_passes # one anyOf valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foobar" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1202,24 +1151,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAnyofWithBaseSchemaRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_both_anyof_invalid_fails # both anyOf invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", + payload, _configuration=self._configuration ) self.api.post_anyof_with_base_schema_request_body(body=body) @@ -1227,12 +1174,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_mismatch_base_schema_fails # mismatch base schema with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, + payload, _configuration=self._configuration ) self.api.post_anyof_with_base_schema_request_body(body=body) @@ -1243,7 +1190,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_anyof_with_one_empty_schema_request_body """ - from unit_test_api.api.post_api_endpoints import post_anyof_with_one_empty_schema_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_anyof_with_one_empty_schema_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -1251,11 +1198,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_string_is_valid_passes # string is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1270,23 +1217,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_number_is_valid_passes # number is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 123 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1301,13 +1246,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -1316,7 +1259,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_array_type_matches_arrays_request_body """ - from unit_test_api.api.post_api_endpoints import post_array_type_matches_arrays_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_array_type_matches_arrays_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -1324,12 +1267,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_float_is_not_an_array_fails # a float is not an array with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, + payload, _configuration=self._configuration ) self.api.post_array_type_matches_arrays_request_body(body=body) @@ -1337,12 +1280,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_boolean_is_not_an_array_fails # a boolean is not an array with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, + payload, _configuration=self._configuration ) self.api.post_array_type_matches_arrays_request_body(body=body) @@ -1350,12 +1293,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_null_is_not_an_array_fails # null is not an array with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, + payload, _configuration=self._configuration ) self.api.post_array_type_matches_arrays_request_body(body=body) @@ -1363,14 +1306,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_object_is_not_an_array_fails # an object is not an array with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, + payload, _configuration=self._configuration ) self.api.post_array_type_matches_arrays_request_body(body=body) @@ -1378,12 +1320,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_string_is_not_an_array_fails # a string is not an array with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", + payload, _configuration=self._configuration ) self.api.post_array_type_matches_arrays_request_body(body=body) @@ -1391,12 +1333,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_array_is_an_array_passes # an array is an array with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1411,24 +1353,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postArrayTypeMatchesArraysRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_an_integer_is_not_an_array_fails # an integer is not an array with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, + payload, _configuration=self._configuration ) self.api.post_array_type_matches_arrays_request_body(body=body) @@ -1439,7 +1379,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_boolean_type_matches_booleans_request_body """ - from unit_test_api.api.post_api_endpoints import post_boolean_type_matches_booleans_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_boolean_type_matches_booleans_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -1447,12 +1387,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_empty_string_is_not_a_boolean_fails # an empty string is not a boolean with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "", + payload, _configuration=self._configuration ) self.api.post_boolean_type_matches_booleans_request_body(body=body) @@ -1460,12 +1400,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_float_is_not_a_boolean_fails # a float is not a boolean with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, + payload, _configuration=self._configuration ) self.api.post_boolean_type_matches_booleans_request_body(body=body) @@ -1473,12 +1413,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_null_is_not_a_boolean_fails # null is not a boolean with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, + payload, _configuration=self._configuration ) self.api.post_boolean_type_matches_booleans_request_body(body=body) @@ -1486,12 +1426,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_zero_is_not_a_boolean_fails # zero is not a boolean with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0, + payload, _configuration=self._configuration ) self.api.post_boolean_type_matches_booleans_request_body(body=body) @@ -1499,14 +1439,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_array_is_not_a_boolean_fails # an array is not a boolean with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], + payload, _configuration=self._configuration ) self.api.post_boolean_type_matches_booleans_request_body(body=body) @@ -1514,12 +1453,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_string_is_not_a_boolean_fails # a string is not a boolean with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", + payload, _configuration=self._configuration ) self.api.post_boolean_type_matches_booleans_request_body(body=body) @@ -1527,11 +1466,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_false_is_a_boolean_passes # false is a boolean with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1546,24 +1485,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_an_integer_is_not_a_boolean_fails # an integer is not a boolean with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, + payload, _configuration=self._configuration ) self.api.post_boolean_type_matches_booleans_request_body(body=body) @@ -1571,11 +1508,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_true_is_a_boolean_passes # true is a boolean with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( True ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1590,26 +1527,23 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_an_object_is_not_a_boolean_fails # an object is not a boolean with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, + payload, _configuration=self._configuration ) self.api.post_boolean_type_matches_booleans_request_body(body=body) @@ -1620,7 +1554,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_by_int_request_body """ - from unit_test_api.api.post_api_endpoints import post_by_int_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_by_int_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -1628,12 +1562,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_int_by_int_fail_fails # int by int fail with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 7 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 7, + payload, _configuration=self._configuration ) self.api.post_by_int_request_body(body=body) @@ -1641,11 +1575,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_int_by_int_passes # int by int with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 10 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1660,23 +1594,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postByIntRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_non_numbers_passes # ignores non-numbers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1691,13 +1623,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postByIntRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -1706,7 +1636,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_by_number_request_body """ - from unit_test_api.api.post_api_endpoints import post_by_number_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_by_number_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -1714,11 +1644,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_45_is_multiple_of15_passes # 4.5 is multiple of 1.5 with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 4.5 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1733,24 +1663,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postByNumberRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_35_is_not_multiple_of15_fails # 35 is not multiple of 1.5 with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 35 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 35, + payload, _configuration=self._configuration ) self.api.post_by_number_request_body(body=body) @@ -1758,11 +1686,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_zero_is_multiple_of_anything_passes # zero is multiple of anything with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 0 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1777,13 +1705,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postByNumberRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -1792,7 +1718,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_by_small_number_request_body """ - from unit_test_api.api.post_api_endpoints import post_by_small_number_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_by_small_number_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -1800,12 +1726,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_000751_is_not_multiple_of00001_fails # 0.00751 is not multiple of 0.0001 with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 0.00751 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0.00751, + payload, _configuration=self._configuration ) self.api.post_by_small_number_request_body(body=body) @@ -1813,11 +1739,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_00075_is_multiple_of00001_passes # 0.0075 is multiple of 0.0001 with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 0.0075 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1832,13 +1758,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postBySmallNumberRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -1847,7 +1771,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_date_time_format_request_body """ - from unit_test_api.api.post_api_endpoints import post_date_time_format_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_date_time_format_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -1855,12 +1779,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_all_string_formats_ignore_objects_passes # all string formats ignore objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1875,23 +1799,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_booleans_passes # all string formats ignore booleans with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1906,23 +1828,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_integers_passes # all string formats ignore integers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1937,23 +1857,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_floats_passes # all string formats ignore floats with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 13.7 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -1968,24 +1886,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_arrays_passes # all string formats ignore arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2000,23 +1916,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_nulls_passes # all string formats ignore nulls with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2031,13 +1945,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -2046,7 +1958,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_email_format_request_body """ - from unit_test_api.api.post_api_endpoints import post_email_format_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_email_format_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -2054,12 +1966,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_all_string_formats_ignore_objects_passes # all string formats ignore objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2074,23 +1986,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEmailFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_booleans_passes # all string formats ignore booleans with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2105,23 +2015,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEmailFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_integers_passes # all string formats ignore integers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2136,23 +2044,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEmailFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_floats_passes # all string formats ignore floats with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 13.7 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2167,24 +2073,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEmailFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_arrays_passes # all string formats ignore arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2199,23 +2103,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEmailFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_nulls_passes # all string formats ignore nulls with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2230,13 +2132,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEmailFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -2245,7 +2145,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_enum_with0_does_not_match_false_request_body """ - from unit_test_api.api.post_api_endpoints import post_enum_with0_does_not_match_false_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_enum_with0_does_not_match_false_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -2253,11 +2153,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_integer_zero_is_valid_passes # integer zero is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 0 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2272,23 +2172,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_float_zero_is_valid_passes # float zero is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 0.0 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2303,24 +2201,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_false_is_invalid_fails # false is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - False, + payload, _configuration=self._configuration ) self.api.post_enum_with0_does_not_match_false_request_body(body=body) @@ -2331,7 +2227,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_enum_with1_does_not_match_true_request_body """ - from unit_test_api.api.post_api_endpoints import post_enum_with1_does_not_match_true_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_enum_with1_does_not_match_true_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -2339,12 +2235,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_true_is_invalid_fails # true is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, + payload, _configuration=self._configuration ) self.api.post_enum_with1_does_not_match_true_request_body(body=body) @@ -2352,11 +2248,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_integer_one_is_valid_passes # integer one is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2371,23 +2267,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_float_one_is_valid_passes # float one is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.0 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2402,13 +2296,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -2417,7 +2309,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_enum_with_escaped_characters_request_body """ - from unit_test_api.api.post_api_endpoints import post_enum_with_escaped_characters_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_enum_with_escaped_characters_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -2425,11 +2317,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_member2_is_valid_passes # member 2 is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo\rbar" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2444,23 +2336,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_member1_is_valid_passes # member 1 is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo\nbar" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2475,24 +2365,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_another_string_is_invalid_fails # another string is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "abc" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "abc", + payload, _configuration=self._configuration ) self.api.post_enum_with_escaped_characters_request_body(body=body) @@ -2503,7 +2391,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_enum_with_false_does_not_match0_request_body """ - from unit_test_api.api.post_api_endpoints import post_enum_with_false_does_not_match0_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_enum_with_false_does_not_match0_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -2511,11 +2399,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_false_is_valid_passes # false is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2530,24 +2418,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEnumWithFalseDoesNotMatch0RequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_float_zero_is_invalid_fails # float zero is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 0.0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0.0, + payload, _configuration=self._configuration ) self.api.post_enum_with_false_does_not_match0_request_body(body=body) @@ -2555,12 +2441,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_integer_zero_is_invalid_fails # integer zero is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0, + payload, _configuration=self._configuration ) self.api.post_enum_with_false_does_not_match0_request_body(body=body) @@ -2571,7 +2457,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_enum_with_true_does_not_match1_request_body """ - from unit_test_api.api.post_api_endpoints import post_enum_with_true_does_not_match1_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_enum_with_true_does_not_match1_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -2579,12 +2465,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_float_one_is_invalid_fails # float one is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.0, + payload, _configuration=self._configuration ) self.api.post_enum_with_true_does_not_match1_request_body(body=body) @@ -2592,11 +2478,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_true_is_valid_passes # true is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( True ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2611,24 +2497,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEnumWithTrueDoesNotMatch1RequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_integer_one_is_invalid_fails # integer one is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, + payload, _configuration=self._configuration ) self.api.post_enum_with_true_does_not_match1_request_body(body=body) @@ -2639,7 +2523,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_enums_in_properties_request_body """ - from unit_test_api.api.post_api_endpoints import post_enums_in_properties_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_enums_in_properties_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -2647,14 +2531,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_missing_optional_property_is_valid_passes # missing optional property is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "bar": "bar", } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2669,19 +2553,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_wrong_foo_value_fails # wrong foo value with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "foot", @@ -2691,12 +2573,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "foot", - "bar": - "bar", - }, + payload, _configuration=self._configuration ) self.api.post_enums_in_properties_request_body(body=body) @@ -2704,7 +2581,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_both_properties_are_valid_passes # both properties are valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "foo", @@ -2713,7 +2590,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2728,19 +2605,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_wrong_bar_value_fails # wrong bar value with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "foo", @@ -2750,12 +2625,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "foo", - "bar": - "bart", - }, + payload, _configuration=self._configuration ) self.api.post_enums_in_properties_request_body(body=body) @@ -2763,14 +2633,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_missing_all_properties_is_invalid_fails # missing all properties is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, + payload, _configuration=self._configuration ) self.api.post_enums_in_properties_request_body(body=body) @@ -2778,7 +2647,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_missing_required_property_is_invalid_fails # missing required property is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "foo", @@ -2786,10 +2655,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "foo", - }, + payload, _configuration=self._configuration ) self.api.post_enums_in_properties_request_body(body=body) @@ -2800,7 +2666,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_forbidden_property_request_body """ - from unit_test_api.api.post_api_endpoints import post_forbidden_property_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_forbidden_property_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -2808,7 +2674,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_property_present_fails # property present with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -2818,12 +2684,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - 2, - }, + payload, _configuration=self._configuration ) self.api.post_forbidden_property_request_body(body=body) @@ -2831,7 +2692,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_property_absent_passes # property absent with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "bar": 1, @@ -2840,7 +2701,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2855,13 +2716,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postForbiddenPropertyRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -2870,7 +2729,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_hostname_format_request_body """ - from unit_test_api.api.post_api_endpoints import post_hostname_format_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_hostname_format_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -2878,12 +2737,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_all_string_formats_ignore_objects_passes # all string formats ignore objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2898,23 +2757,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postHostnameFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_booleans_passes # all string formats ignore booleans with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2929,23 +2786,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postHostnameFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_integers_passes # all string formats ignore integers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2960,23 +2815,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postHostnameFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_floats_passes # all string formats ignore floats with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 13.7 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -2991,24 +2844,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postHostnameFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_arrays_passes # all string formats ignore arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3023,23 +2874,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postHostnameFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_nulls_passes # all string formats ignore nulls with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3054,13 +2903,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postHostnameFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -3069,7 +2916,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_integer_type_matches_integers_request_body """ - from unit_test_api.api.post_api_endpoints import post_integer_type_matches_integers_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_integer_type_matches_integers_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -3077,14 +2924,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_object_is_not_an_integer_fails # an object is not an integer with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, + payload, _configuration=self._configuration ) self.api.post_integer_type_matches_integers_request_body(body=body) @@ -3092,12 +2938,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_string_is_not_an_integer_fails # a string is not an integer with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", + payload, _configuration=self._configuration ) self.api.post_integer_type_matches_integers_request_body(body=body) @@ -3105,12 +2951,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_null_is_not_an_integer_fails # null is not an integer with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, + payload, _configuration=self._configuration ) self.api.post_integer_type_matches_integers_request_body(body=body) @@ -3118,11 +2964,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_float_with_zero_fractional_part_is_an_integer_passes # a float with zero fractional part is an integer with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.0 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3137,24 +2983,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_a_float_is_not_an_integer_fails # a float is not an integer with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, + payload, _configuration=self._configuration ) self.api.post_integer_type_matches_integers_request_body(body=body) @@ -3162,12 +3006,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_boolean_is_not_an_integer_fails # a boolean is not an integer with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, + payload, _configuration=self._configuration ) self.api.post_integer_type_matches_integers_request_body(body=body) @@ -3175,11 +3019,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_integer_is_an_integer_passes # an integer is an integer with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3194,24 +3038,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails # a string is still not an integer, even if it looks like one with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "1" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "1", + payload, _configuration=self._configuration ) self.api.post_integer_type_matches_integers_request_body(body=body) @@ -3219,14 +3061,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_array_is_not_an_integer_fails # an array is not an integer with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], + payload, _configuration=self._configuration ) self.api.post_integer_type_matches_integers_request_body(body=body) @@ -3237,7 +3078,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body """ - from unit_test_api.api.post_api_endpoints import post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -3245,23 +3086,52 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails # always invalid, but naive implementations may raise an overflow error with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.0E308 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.0E308, + payload, _configuration=self._configuration ) self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body=body) + # test_valid_integer_with_multipleof_float_passes + # valid integer with multipleOf float + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123456789 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + def test_post_invalid_string_value_for_default_request_body(self): """Test case for post_invalid_string_value_for_default_request_body """ - from unit_test_api.api.post_api_endpoints import post_invalid_string_value_for_default_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_invalid_string_value_for_default_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -3269,14 +3139,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_valid_when_property_is_specified_passes # valid when property is specified with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "bar": "good", } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3291,24 +3161,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_still_valid_when_the_invalid_default_is_used_passes # still valid when the invalid default is used with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3323,13 +3191,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -3338,7 +3204,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_ipv4_format_request_body """ - from unit_test_api.api.post_api_endpoints import post_ipv4_format_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_ipv4_format_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -3346,12 +3212,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_all_string_formats_ignore_objects_passes # all string formats ignore objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3366,23 +3232,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv4FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_booleans_passes # all string formats ignore booleans with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3397,23 +3261,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv4FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_integers_passes # all string formats ignore integers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3428,23 +3290,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv4FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_floats_passes # all string formats ignore floats with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 13.7 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3459,24 +3319,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv4FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_arrays_passes # all string formats ignore arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3491,23 +3349,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv4FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_nulls_passes # all string formats ignore nulls with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3522,13 +3378,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv4FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -3537,7 +3391,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_ipv6_format_request_body """ - from unit_test_api.api.post_api_endpoints import post_ipv6_format_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_ipv6_format_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -3545,12 +3399,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_all_string_formats_ignore_objects_passes # all string formats ignore objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3565,23 +3419,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv6FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_booleans_passes # all string formats ignore booleans with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3596,23 +3448,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv6FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_integers_passes # all string formats ignore integers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3627,23 +3477,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv6FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_floats_passes # all string formats ignore floats with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 13.7 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3658,24 +3506,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv6FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_arrays_passes # all string formats ignore arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3690,23 +3536,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv6FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_nulls_passes # all string formats ignore nulls with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3721,13 +3565,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postIpv6FormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -3736,7 +3578,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_json_pointer_format_request_body """ - from unit_test_api.api.post_api_endpoints import post_json_pointer_format_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_json_pointer_format_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -3744,12 +3586,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_all_string_formats_ignore_objects_passes # all string formats ignore objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3764,23 +3606,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_booleans_passes # all string formats ignore booleans with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3795,23 +3635,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_integers_passes # all string formats ignore integers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3826,23 +3664,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_floats_passes # all string formats ignore floats with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 13.7 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3857,24 +3693,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_arrays_passes # all string formats ignore arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3889,23 +3723,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_nulls_passes # all string formats ignore nulls with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3920,13 +3752,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -3935,7 +3765,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_maximum_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_maximum_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_maximum_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -3943,11 +3773,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_below_the_maximum_is_valid_passes # below the maximum is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 2.6 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3962,23 +3792,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaximumValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_boundary_point_is_valid_passes # boundary point is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 3.0 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -3993,24 +3821,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaximumValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_above_the_maximum_is_invalid_fails # above the maximum is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 3.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3.5, + payload, _configuration=self._configuration ) self.api.post_maximum_validation_request_body(body=body) @@ -4018,11 +3844,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_ignores_non_numbers_passes # ignores non-numbers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "x" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4037,13 +3863,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaximumValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -4052,7 +3876,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_maximum_validation_with_unsigned_integer_request_body """ - from unit_test_api.api.post_api_endpoints import post_maximum_validation_with_unsigned_integer_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_maximum_validation_with_unsigned_integer_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -4060,11 +3884,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_below_the_maximum_is_invalid_passes # below the maximum is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 299.97 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4079,24 +3903,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_above_the_maximum_is_invalid_fails # above the maximum is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 300.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 300.5, + payload, _configuration=self._configuration ) self.api.post_maximum_validation_with_unsigned_integer_request_body(body=body) @@ -4104,11 +3926,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_boundary_point_integer_is_valid_passes # boundary point integer is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 300 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4123,23 +3945,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_boundary_point_float_is_valid_passes # boundary point float is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 300.0 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4154,13 +3974,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -4169,7 +3987,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_maxitems_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_maxitems_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_maxitems_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -4177,7 +3995,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_too_long_is_invalid_fails # too long is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, 2, @@ -4186,11 +4004,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1, - 2, - 3, - ], + payload, _configuration=self._configuration ) self.api.post_maxitems_validation_request_body(body=body) @@ -4198,11 +4012,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_ignores_non_arrays_passes # ignores non-arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foobar" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4217,25 +4031,23 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_shorter_is_valid_passes # shorter is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4250,26 +4062,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_exact_length_is_valid_passes # exact length is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, 2, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4284,13 +4094,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -4299,7 +4107,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_maxlength_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_maxlength_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_maxlength_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -4307,12 +4115,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_too_long_is_invalid_fails # too long is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", + payload, _configuration=self._configuration ) self.api.post_maxlength_validation_request_body(body=body) @@ -4320,11 +4128,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_ignores_non_strings_passes # ignores non-strings with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 100 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4339,23 +4147,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_shorter_is_valid_passes # shorter is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "f" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4370,23 +4176,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_two_supplementary_unicode_code_points_is_long_enough_passes # two supplementary Unicode code points is long enough with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "💩💩" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4401,23 +4205,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_exact_length_is_valid_passes # exact length is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "fo" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4432,13 +4234,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -4447,7 +4247,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_maxproperties0_means_the_object_is_empty_request_body """ - from unit_test_api.api.post_api_endpoints import post_maxproperties0_means_the_object_is_empty_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_maxproperties0_means_the_object_is_empty_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -4455,12 +4255,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_no_properties_is_valid_passes # no properties is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4475,19 +4275,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_one_property_is_invalid_fails # one property is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -4495,10 +4293,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - }, + payload, _configuration=self._configuration ) self.api.post_maxproperties0_means_the_object_is_empty_request_body(body=body) @@ -4509,7 +4304,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_maxproperties_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_maxproperties_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_maxproperties_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -4517,7 +4312,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_too_long_is_invalid_fails # too long is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -4529,14 +4324,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - 2, - "baz": - 3, - }, + payload, _configuration=self._configuration ) self.api.post_maxproperties_validation_request_body(body=body) @@ -4544,7 +4332,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_ignores_arrays_passes # ignores arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, 2, @@ -4552,7 +4340,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4567,23 +4355,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_other_non_objects_passes # ignores other non-objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4598,23 +4384,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_strings_passes # ignores strings with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foobar" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4629,26 +4413,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_shorter_is_valid_passes # shorter is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4663,19 +4445,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_exact_length_is_valid_passes # exact length is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -4684,7 +4464,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4699,13 +4479,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -4714,7 +4492,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_minimum_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_minimum_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_minimum_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -4722,11 +4500,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_boundary_point_is_valid_passes # boundary point is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4741,24 +4519,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinimumValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_below_the_minimum_is_invalid_fails # below the minimum is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 0.6 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0.6, + payload, _configuration=self._configuration ) self.api.post_minimum_validation_request_body(body=body) @@ -4766,11 +4542,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_above_the_minimum_is_valid_passes # above the minimum is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 2.6 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4785,23 +4561,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinimumValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_non_numbers_passes # ignores non-numbers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "x" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4816,13 +4590,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinimumValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -4831,7 +4603,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_minimum_validation_with_signed_integer_request_body """ - from unit_test_api.api.post_api_endpoints import post_minimum_validation_with_signed_integer_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_minimum_validation_with_signed_integer_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -4839,11 +4611,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_boundary_point_is_valid_passes # boundary point is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( -2 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4858,23 +4630,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_positive_above_the_minimum_is_valid_passes # positive above the minimum is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 0 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4889,24 +4659,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_int_below_the_minimum_is_invalid_fails # int below the minimum is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( -3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - -3, + payload, _configuration=self._configuration ) self.api.post_minimum_validation_with_signed_integer_request_body(body=body) @@ -4914,12 +4682,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_float_below_the_minimum_is_invalid_fails # float below the minimum is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( -2.0001 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - -2.0001, + payload, _configuration=self._configuration ) self.api.post_minimum_validation_with_signed_integer_request_body(body=body) @@ -4927,11 +4695,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_boundary_point_with_float_is_valid_passes # boundary point with float is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( -2.0 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4946,23 +4714,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_negative_above_the_minimum_is_valid_passes # negative above the minimum is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( -1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -4977,23 +4743,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_non_numbers_passes # ignores non-numbers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "x" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5008,13 +4772,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -5023,7 +4785,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_minitems_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_minitems_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_minitems_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -5031,14 +4793,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_too_short_is_invalid_fails # too short is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], + payload, _configuration=self._configuration ) self.api.post_minitems_validation_request_body(body=body) @@ -5046,11 +4807,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_ignores_non_arrays_passes # ignores non-arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5065,26 +4826,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_longer_is_valid_passes # longer is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, 2, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5099,25 +4858,23 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_exact_length_is_valid_passes # exact length is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5132,13 +4889,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -5147,7 +4902,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_minlength_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_minlength_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_minlength_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -5155,12 +4910,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_too_short_is_invalid_fails # too short is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "f" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "f", + payload, _configuration=self._configuration ) self.api.post_minlength_validation_request_body(body=body) @@ -5168,12 +4923,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_one_supplementary_unicode_code_point_is_not_long_enough_fails # one supplementary Unicode code point is not long enough with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "💩" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "💩", + payload, _configuration=self._configuration ) self.api.post_minlength_validation_request_body(body=body) @@ -5181,11 +4936,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_longer_is_valid_passes # longer is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5200,23 +4955,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_non_strings_passes # ignores non-strings with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5231,23 +4984,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_exact_length_is_valid_passes # exact length is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "fo" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5262,13 +5013,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -5277,7 +5026,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_minproperties_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_minproperties_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_minproperties_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -5285,12 +5034,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_ignores_arrays_passes # ignores arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5305,23 +5054,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_other_non_objects_passes # ignores other non-objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5336,26 +5083,23 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_too_short_is_invalid_fails # too short is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, + payload, _configuration=self._configuration ) self.api.post_minproperties_validation_request_body(body=body) @@ -5363,11 +5107,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_ignores_strings_passes # ignores strings with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5382,19 +5126,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_longer_is_valid_passes # longer is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -5403,7 +5145,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5418,26 +5160,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_exact_length_is_valid_passes # exact length is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5452,13 +5192,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -5467,7 +5205,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_nested_allof_to_check_validation_semantics_request_body """ - from unit_test_api.api.post_api_endpoints import post_nested_allof_to_check_validation_semantics_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_nested_allof_to_check_validation_semantics_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -5475,12 +5213,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_anything_non_null_is_invalid_fails # anything non-null is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, + payload, _configuration=self._configuration ) self.api.post_nested_allof_to_check_validation_semantics_request_body(body=body) @@ -5488,11 +5226,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_null_is_valid_passes # null is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5507,13 +5245,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -5522,7 +5258,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_nested_anyof_to_check_validation_semantics_request_body """ - from unit_test_api.api.post_api_endpoints import post_nested_anyof_to_check_validation_semantics_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_nested_anyof_to_check_validation_semantics_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -5530,12 +5266,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_anything_non_null_is_invalid_fails # anything non-null is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, + payload, _configuration=self._configuration ) self.api.post_nested_anyof_to_check_validation_semantics_request_body(body=body) @@ -5543,11 +5279,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_null_is_valid_passes # null is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5562,13 +5298,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -5577,7 +5311,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_nested_items_request_body """ - from unit_test_api.api.post_api_endpoints import post_nested_items_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_nested_items_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -5585,7 +5319,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_valid_nested_array_passes # valid nested array with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ [ @@ -5618,7 +5352,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5633,19 +5367,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNestedItemsRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_nested_array_with_invalid_type_fails # nested array with invalid type with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ [ @@ -5679,36 +5411,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - [ - [ - "1", - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ], + payload, _configuration=self._configuration ) self.api.post_nested_items_request_body(body=body) @@ -5716,7 +5419,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_not_deep_enough_fails # not deep enough with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ [ @@ -5744,30 +5447,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - [ - 1, - ], - [ - 2, - ], - [ - 3, - ], - ], - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], + payload, _configuration=self._configuration ) self.api.post_nested_items_request_body(body=body) @@ -5778,7 +5458,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_nested_oneof_to_check_validation_semantics_request_body """ - from unit_test_api.api.post_api_endpoints import post_nested_oneof_to_check_validation_semantics_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_nested_oneof_to_check_validation_semantics_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -5786,12 +5466,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_anything_non_null_is_invalid_fails # anything non-null is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, + payload, _configuration=self._configuration ) self.api.post_nested_oneof_to_check_validation_semantics_request_body(body=body) @@ -5799,11 +5479,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_null_is_valid_passes # null is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5818,13 +5498,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -5833,7 +5511,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_not_more_complex_schema_request_body """ - from unit_test_api.api.post_api_endpoints import post_not_more_complex_schema_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_not_more_complex_schema_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -5841,14 +5519,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_other_match_passes # other match with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5863,19 +5541,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_mismatch_fails # mismatch with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "bar", @@ -5883,10 +5559,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "bar", - }, + payload, _configuration=self._configuration ) self.api.post_not_more_complex_schema_request_body(body=body) @@ -5894,11 +5567,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_match_passes # match with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5913,13 +5586,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -5928,7 +5599,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_not_request_body """ - from unit_test_api.api.post_api_endpoints import post_not_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_not_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -5936,11 +5607,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_allowed_passes # allowed with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -5955,24 +5626,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNotRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_disallowed_fails # disallowed with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, + payload, _configuration=self._configuration ) self.api.post_not_request_body(body=body) @@ -5983,7 +5652,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_nul_characters_in_strings_request_body """ - from unit_test_api.api.post_api_endpoints import post_nul_characters_in_strings_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_nul_characters_in_strings_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -5991,11 +5660,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_match_string_with_nul_passes # match string with nul with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "hello\x00there" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6010,24 +5679,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNulCharactersInStringsRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_do_not_match_string_lacking_nul_fails # do not match string lacking nul with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "hellothere" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "hellothere", + payload, _configuration=self._configuration ) self.api.post_nul_characters_in_strings_request_body(body=body) @@ -6038,7 +5705,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_null_type_matches_only_the_null_object_request_body """ - from unit_test_api.api.post_api_endpoints import post_null_type_matches_only_the_null_object_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_null_type_matches_only_the_null_object_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -6046,12 +5713,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_float_is_not_null_fails # a float is not null with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, + payload, _configuration=self._configuration ) self.api.post_null_type_matches_only_the_null_object_request_body(body=body) @@ -6059,14 +5726,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_object_is_not_null_fails # an object is not null with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, + payload, _configuration=self._configuration ) self.api.post_null_type_matches_only_the_null_object_request_body(body=body) @@ -6074,12 +5740,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_false_is_not_null_fails # false is not null with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - False, + payload, _configuration=self._configuration ) self.api.post_null_type_matches_only_the_null_object_request_body(body=body) @@ -6087,12 +5753,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_integer_is_not_null_fails # an integer is not null with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, + payload, _configuration=self._configuration ) self.api.post_null_type_matches_only_the_null_object_request_body(body=body) @@ -6100,12 +5766,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_true_is_not_null_fails # true is not null with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, + payload, _configuration=self._configuration ) self.api.post_null_type_matches_only_the_null_object_request_body(body=body) @@ -6113,12 +5779,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_zero_is_not_null_fails # zero is not null with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 0 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0, + payload, _configuration=self._configuration ) self.api.post_null_type_matches_only_the_null_object_request_body(body=body) @@ -6126,12 +5792,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_empty_string_is_not_null_fails # an empty string is not null with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "", + payload, _configuration=self._configuration ) self.api.post_null_type_matches_only_the_null_object_request_body(body=body) @@ -6139,11 +5805,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_null_is_null_passes # null is null with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6158,26 +5824,23 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_an_array_is_not_null_fails # an array is not null with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], + payload, _configuration=self._configuration ) self.api.post_null_type_matches_only_the_null_object_request_body(body=body) @@ -6185,12 +5848,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_string_is_not_null_fails # a string is not null with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", + payload, _configuration=self._configuration ) self.api.post_null_type_matches_only_the_null_object_request_body(body=body) @@ -6201,7 +5864,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_number_type_matches_numbers_request_body """ - from unit_test_api.api.post_api_endpoints import post_number_type_matches_numbers_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_number_type_matches_numbers_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -6209,14 +5872,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_array_is_not_a_number_fails # an array is not a number with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], + payload, _configuration=self._configuration ) self.api.post_number_type_matches_numbers_request_body(body=body) @@ -6224,12 +5886,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_null_is_not_a_number_fails # null is not a number with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, + payload, _configuration=self._configuration ) self.api.post_number_type_matches_numbers_request_body(body=body) @@ -6237,14 +5899,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_object_is_not_a_number_fails # an object is not a number with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, + payload, _configuration=self._configuration ) self.api.post_number_type_matches_numbers_request_body(body=body) @@ -6252,12 +5913,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_boolean_is_not_a_number_fails # a boolean is not a number with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, + payload, _configuration=self._configuration ) self.api.post_number_type_matches_numbers_request_body(body=body) @@ -6265,11 +5926,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_float_is_a_number_passes # a float is a number with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6284,24 +5945,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails # a string is still not a number, even if it looks like one with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "1" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "1", + payload, _configuration=self._configuration ) self.api.post_number_type_matches_numbers_request_body(body=body) @@ -6309,12 +5968,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_string_is_not_a_number_fails # a string is not a number with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", + payload, _configuration=self._configuration ) self.api.post_number_type_matches_numbers_request_body(body=body) @@ -6322,11 +5981,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_integer_is_a_number_passes # an integer is a number with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6341,23 +6000,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes # a float with zero fractional part is a number (and an integer) with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.0 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6372,13 +6029,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -6387,7 +6042,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_object_properties_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_object_properties_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_object_properties_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -6395,12 +6050,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_ignores_arrays_passes # ignores arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6415,23 +6070,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_other_non_objects_passes # ignores other non-objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6446,19 +6099,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_one_property_invalid_is_invalid_fails # one property invalid is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -6469,13 +6120,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - { - }, - }, + payload, _configuration=self._configuration ) self.api.post_object_properties_validation_request_body(body=body) @@ -6483,7 +6128,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_both_properties_present_and_valid_is_valid_passes # both properties present and valid is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, @@ -6492,7 +6137,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6507,19 +6152,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_doesn_t_invalidate_other_properties_passes # doesn't invalidate other properties with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "quux": [ @@ -6527,7 +6170,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6542,19 +6185,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_both_properties_invalid_is_invalid_fails # both properties invalid is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": [ @@ -6566,14 +6207,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - [ - ], - "bar": - { - }, - }, + payload, _configuration=self._configuration ) self.api.post_object_properties_validation_request_body(body=body) @@ -6584,7 +6218,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_object_type_matches_objects_request_body """ - from unit_test_api.api.post_api_endpoints import post_object_type_matches_objects_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_object_type_matches_objects_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -6592,12 +6226,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_float_is_not_an_object_fails # a float is not an object with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, + payload, _configuration=self._configuration ) self.api.post_object_type_matches_objects_request_body(body=body) @@ -6605,12 +6239,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_null_is_not_an_object_fails # null is not an object with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, + payload, _configuration=self._configuration ) self.api.post_object_type_matches_objects_request_body(body=body) @@ -6618,14 +6252,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_array_is_not_an_object_fails # an array is not an object with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], + payload, _configuration=self._configuration ) self.api.post_object_type_matches_objects_request_body(body=body) @@ -6633,12 +6266,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_object_is_an_object_passes # an object is an object with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6653,24 +6286,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postObjectTypeMatchesObjectsRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_a_string_is_not_an_object_fails # a string is not an object with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", + payload, _configuration=self._configuration ) self.api.post_object_type_matches_objects_request_body(body=body) @@ -6678,12 +6309,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_integer_is_not_an_object_fails # an integer is not an object with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, + payload, _configuration=self._configuration ) self.api.post_object_type_matches_objects_request_body(body=body) @@ -6691,12 +6322,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_boolean_is_not_an_object_fails # a boolean is not an object with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, + payload, _configuration=self._configuration ) self.api.post_object_type_matches_objects_request_body(body=body) @@ -6707,7 +6338,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_oneof_complex_types_request_body """ - from unit_test_api.api.post_api_endpoints import post_oneof_complex_types_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_oneof_complex_types_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -6715,14 +6346,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_first_oneof_valid_complex_passes # first oneOf valid (complex) with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "bar": 2, } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6737,19 +6368,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_neither_oneof_valid_complex_fails # neither oneOf valid (complex) with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 2, @@ -6759,12 +6388,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 2, - "bar": - "quux", - }, + payload, _configuration=self._configuration ) self.api.post_oneof_complex_types_request_body(body=body) @@ -6772,7 +6396,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_both_oneof_valid_complex_fails # both oneOf valid (complex) with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "baz", @@ -6782,12 +6406,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "baz", - "bar": - 2, - }, + payload, _configuration=self._configuration ) self.api.post_oneof_complex_types_request_body(body=body) @@ -6795,14 +6414,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_second_oneof_valid_complex_passes # second oneOf valid (complex) with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": "baz", } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6817,13 +6436,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -6832,7 +6449,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_oneof_request_body """ - from unit_test_api.api.post_api_endpoints import post_oneof_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_oneof_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -6840,11 +6457,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_second_oneof_valid_passes # second oneOf valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 2.5 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6859,24 +6476,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postOneofRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_both_oneof_valid_fails # both oneOf valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, + payload, _configuration=self._configuration ) self.api.post_oneof_request_body(body=body) @@ -6884,11 +6499,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_first_oneof_valid_passes # first oneOf valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6903,24 +6518,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postOneofRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_neither_oneof_valid_fails # neither oneOf valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.5 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.5, + payload, _configuration=self._configuration ) self.api.post_oneof_request_body(body=body) @@ -6931,7 +6544,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_oneof_with_base_schema_request_body """ - from unit_test_api.api.post_api_endpoints import post_oneof_with_base_schema_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_oneof_with_base_schema_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -6939,12 +6552,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_both_oneof_valid_fails # both oneOf valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", + payload, _configuration=self._configuration ) self.api.post_oneof_with_base_schema_request_body(body=body) @@ -6952,12 +6565,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_mismatch_base_schema_fails # mismatch base schema with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 3 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, + payload, _configuration=self._configuration ) self.api.post_oneof_with_base_schema_request_body(body=body) @@ -6965,11 +6578,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_one_oneof_valid_passes # one oneOf valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foobar" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -6984,13 +6597,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postOneofWithBaseSchemaRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -6999,7 +6610,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_oneof_with_empty_schema_request_body """ - from unit_test_api.api.post_api_endpoints import post_oneof_with_empty_schema_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_oneof_with_empty_schema_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7007,12 +6618,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_both_valid_invalid_fails # both valid - invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 123 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, + payload, _configuration=self._configuration ) self.api.post_oneof_with_empty_schema_request_body(body=body) @@ -7020,11 +6631,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_one_valid_valid_passes # one valid - valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7039,13 +6650,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postOneofWithEmptySchemaRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -7054,7 +6663,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_pattern_is_not_anchored_request_body """ - from unit_test_api.api.post_api_endpoints import post_pattern_is_not_anchored_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_pattern_is_not_anchored_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7062,11 +6671,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_matches_a_substring_passes # matches a substring with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "xxaayy" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7081,13 +6690,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postPatternIsNotAnchoredRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -7096,7 +6703,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_pattern_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_pattern_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_pattern_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7104,12 +6711,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_ignores_arrays_passes # ignores arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7124,24 +6731,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postPatternValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_objects_passes # ignores objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7156,23 +6761,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postPatternValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_null_passes # ignores null with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7187,23 +6790,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postPatternValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_floats_passes # ignores floats with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.0 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7218,24 +6819,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postPatternValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_a_non_matching_pattern_is_invalid_fails # a non-matching pattern is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "abc" ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "abc", + payload, _configuration=self._configuration ) self.api.post_pattern_validation_request_body(body=body) @@ -7243,11 +6842,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_ignores_booleans_passes # ignores booleans with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( True ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7262,23 +6861,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postPatternValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_a_matching_pattern_is_valid_passes # a matching pattern is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "aaa" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7293,23 +6890,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postPatternValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_integers_passes # ignores integers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 123 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7324,13 +6919,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postPatternValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -7339,7 +6932,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_properties_with_escaped_characters_request_body """ - from unit_test_api.api.post_api_endpoints import post_properties_with_escaped_characters_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_properties_with_escaped_characters_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7347,7 +6940,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_object_with_all_numbers_is_valid_passes # object with all numbers is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo\nbar": 1, @@ -7364,7 +6957,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7379,19 +6972,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postPropertiesWithEscapedCharactersRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_object_with_strings_is_invalid_fails # object with strings is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo\nbar": "1", @@ -7409,20 +7000,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo\nbar": - "1", - "foo\"bar": - "1", - "foo\\bar": - "1", - "foo\rbar": - "1", - "foo\tbar": - "1", - "foo\fbar": - "1", - }, + payload, _configuration=self._configuration ) self.api.post_properties_with_escaped_characters_request_body(body=body) @@ -7433,7 +7011,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_property_named_ref_that_is_not_a_reference_request_body """ - from unit_test_api.api.post_api_endpoints import post_property_named_ref_that_is_not_a_reference_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_property_named_ref_that_is_not_a_reference_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7441,14 +7019,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_property_named_ref_valid_passes # property named $ref valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "$ref": "a", } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7463,19 +7041,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_property_named_ref_invalid_fails # property named $ref invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "$ref": 2, @@ -7483,10 +7059,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, + payload, _configuration=self._configuration ) self.api.post_property_named_ref_that_is_not_a_reference_request_body(body=body) @@ -7497,7 +7070,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_ref_in_additionalproperties_request_body """ - from unit_test_api.api.post_api_endpoints import post_ref_in_additionalproperties_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_ref_in_additionalproperties_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7505,7 +7078,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_property_named_ref_valid_passes # property named $ref valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "someProp": { @@ -7515,7 +7088,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7530,19 +7103,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRefInAdditionalpropertiesRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_property_named_ref_invalid_fails # property named $ref invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "someProp": { @@ -7553,13 +7124,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "someProp": - { - "$ref": - 2, - }, - }, + payload, _configuration=self._configuration ) self.api.post_ref_in_additionalproperties_request_body(body=body) @@ -7570,7 +7135,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_ref_in_allof_request_body """ - from unit_test_api.api.post_api_endpoints import post_ref_in_allof_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_ref_in_allof_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7578,14 +7143,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_property_named_ref_valid_passes # property named $ref valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "$ref": "a", } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7600,19 +7165,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRefInAllofRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_property_named_ref_invalid_fails # property named $ref invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "$ref": 2, @@ -7620,10 +7183,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, + payload, _configuration=self._configuration ) self.api.post_ref_in_allof_request_body(body=body) @@ -7634,7 +7194,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_ref_in_anyof_request_body """ - from unit_test_api.api.post_api_endpoints import post_ref_in_anyof_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_ref_in_anyof_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7642,14 +7202,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_property_named_ref_valid_passes # property named $ref valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "$ref": "a", } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7664,19 +7224,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRefInAnyofRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_property_named_ref_invalid_fails # property named $ref invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "$ref": 2, @@ -7684,10 +7242,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, + payload, _configuration=self._configuration ) self.api.post_ref_in_anyof_request_body(body=body) @@ -7698,7 +7253,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_ref_in_items_request_body """ - from unit_test_api.api.post_api_endpoints import post_ref_in_items_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_ref_in_items_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7706,7 +7261,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_property_named_ref_valid_passes # property named $ref valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "$ref": @@ -7715,7 +7270,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7730,19 +7285,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRefInItemsRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_property_named_ref_invalid_fails # property named $ref invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "$ref": @@ -7752,12 +7305,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "$ref": - 2, - }, - ], + payload, _configuration=self._configuration ) self.api.post_ref_in_items_request_body(body=body) @@ -7768,7 +7316,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_ref_in_oneof_request_body """ - from unit_test_api.api.post_api_endpoints import post_ref_in_oneof_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_ref_in_oneof_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7776,14 +7324,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_property_named_ref_valid_passes # property named $ref valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "$ref": "a", } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7798,19 +7346,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRefInOneofRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_property_named_ref_invalid_fails # property named $ref invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "$ref": 2, @@ -7818,10 +7364,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, + payload, _configuration=self._configuration ) self.api.post_ref_in_oneof_request_body(body=body) @@ -7832,7 +7375,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_ref_in_property_request_body """ - from unit_test_api.api.post_api_endpoints import post_ref_in_property_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_ref_in_property_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7840,7 +7383,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_property_named_ref_valid_passes # property named $ref valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "a": { @@ -7850,7 +7393,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7865,19 +7408,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRefInPropertyRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_property_named_ref_invalid_fails # property named $ref invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "a": { @@ -7888,13 +7429,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "a": - { - "$ref": - 2, - }, - }, + payload, _configuration=self._configuration ) self.api.post_ref_in_property_request_body(body=body) @@ -7905,7 +7440,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_required_default_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_required_default_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_required_default_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7913,12 +7448,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_not_required_by_default_passes # not required by default with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7933,13 +7468,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRequiredDefaultValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -7948,7 +7481,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_required_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_required_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_required_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -7956,12 +7489,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_ignores_arrays_passes # ignores arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -7976,26 +7509,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRequiredValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_present_required_property_is_valid_passes # present required property is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "foo": 1, } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8010,23 +7541,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRequiredValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_other_non_objects_passes # ignores other non-objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8041,23 +7570,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRequiredValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_ignores_strings_passes # ignores strings with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8072,19 +7599,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRequiredValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_non_present_required_property_is_invalid_fails # non-present required property is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "bar": 1, @@ -8092,10 +7617,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 1, - }, + payload, _configuration=self._configuration ) self.api.post_required_validation_request_body(body=body) @@ -8106,7 +7628,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_required_with_empty_array_request_body """ - from unit_test_api.api.post_api_endpoints import post_required_with_empty_array_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_required_with_empty_array_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -8114,12 +7636,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_property_not_required_passes # property not required with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8134,13 +7656,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postRequiredWithEmptyArrayRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -8149,7 +7669,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_simple_enum_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_simple_enum_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_simple_enum_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -8157,12 +7677,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_something_else_is_invalid_fails # something else is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 4 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 4, + payload, _configuration=self._configuration ) self.api.post_simple_enum_validation_request_body(body=body) @@ -8170,11 +7690,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_one_of_the_enum_is_valid_passes # one of the enum is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8189,13 +7709,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postSimpleEnumValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -8204,7 +7722,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_string_type_matches_strings_request_body """ - from unit_test_api.api.post_api_endpoints import post_string_type_matches_strings_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_string_type_matches_strings_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -8212,12 +7730,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_1_is_not_a_string_fails # 1 is not a string with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, + payload, _configuration=self._configuration ) self.api.post_string_type_matches_strings_request_body(body=body) @@ -8225,11 +7743,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes # a string is still a string, even if it looks like a number with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "1" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8244,23 +7762,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_an_empty_string_is_still_a_string_passes # an empty string is still a string with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8275,24 +7791,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_a_float_is_not_a_string_fails # a float is not a string with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 1.1 ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, + payload, _configuration=self._configuration ) self.api.post_string_type_matches_strings_request_body(body=body) @@ -8300,14 +7814,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_object_is_not_a_string_fails # an object is not a string with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, + payload, _configuration=self._configuration ) self.api.post_string_type_matches_strings_request_body(body=body) @@ -8315,14 +7828,13 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_an_array_is_not_a_string_fails # an array is not a string with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], + payload, _configuration=self._configuration ) self.api.post_string_type_matches_strings_request_body(body=body) @@ -8330,12 +7842,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_boolean_is_not_a_string_fails # a boolean is not a string with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( True ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, + payload, _configuration=self._configuration ) self.api.post_string_type_matches_strings_request_body(body=body) @@ -8343,12 +7855,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_null_is_not_a_string_fails # null is not a string with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, + payload, _configuration=self._configuration ) self.api.post_string_type_matches_strings_request_body(body=body) @@ -8356,11 +7868,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_a_string_is_a_string_passes # a string is a string with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( "foo" ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8375,13 +7887,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -8390,7 +7900,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body """ - from unit_test_api.api.post_api_endpoints import post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -8398,12 +7908,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_missing_properties_are_not_filled_in_with_the_default_passes # missing properties are not filled in with the default with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8418,26 +7928,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_an_explicit_property_value_is_checked_against_maximum_passing_passes # an explicit property value is checked against maximum (passing) with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "alpha": 1, } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8452,19 +7960,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_an_explicit_property_value_is_checked_against_maximum_failing_fails # an explicit property value is checked against maximum (failing) with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { "alpha": 5, @@ -8472,10 +7978,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "alpha": - 5, - }, + payload, _configuration=self._configuration ) self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(body=body) @@ -8486,7 +7989,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_uniqueitems_false_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_uniqueitems_false_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_uniqueitems_false_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -8494,14 +7997,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_non_unique_array_of_integers_is_valid_passes # non-unique array of integers is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, 1, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8516,19 +8019,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_unique_array_of_objects_is_valid_passes # unique array of objects is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "foo": @@ -8541,7 +8042,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8556,19 +8057,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_non_unique_array_of_nested_objects_is_valid_passes # non-unique array of nested objects is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "foo": @@ -8593,7 +8092,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8608,19 +8107,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_non_unique_array_of_objects_is_valid_passes # non-unique array of objects is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "foo": @@ -8633,7 +8130,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8648,26 +8145,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_1_and_true_are_unique_passes # 1 and true are unique with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, True, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8682,26 +8177,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_unique_array_of_integers_is_valid_passes # unique array of integers is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, 2, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8716,19 +8209,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_non_unique_array_of_arrays_is_valid_passes # non-unique array of arrays is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ "foo", @@ -8739,7 +8230,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8754,19 +8245,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_numbers_are_unique_if_mathematically_unequal_passes # numbers are unique if mathematically unequal with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1.0, 1.0, @@ -8774,7 +8263,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8789,26 +8278,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_false_is_not_equal_to_zero_passes # false is not equal to zero with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 0, False, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8823,19 +8310,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_unique_array_of_nested_objects_is_valid_passes # unique array of nested objects is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "foo": @@ -8860,7 +8345,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8875,26 +8360,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_0_and_false_are_unique_passes # 0 and false are unique with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 0, False, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8909,19 +8392,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_unique_array_of_arrays_is_valid_passes # unique array of arrays is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ "foo", @@ -8932,7 +8413,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8947,26 +8428,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_true_is_not_equal_to_one_passes # true is not equal to one with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, True, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -8981,19 +8460,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_non_unique_heterogeneous_types_are_valid_passes # non-unique heterogeneous types are valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { }, @@ -9008,7 +8485,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9023,19 +8500,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_unique_heterogeneous_types_are_valid_passes # unique heterogeneous types are valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { }, @@ -9048,7 +8523,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9063,13 +8538,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -9078,7 +8551,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_uniqueitems_validation_request_body """ - from unit_test_api.api.post_api_endpoints import post_uniqueitems_validation_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_uniqueitems_validation_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -9086,7 +8559,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_unique_array_of_objects_is_valid_passes # unique array of objects is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "foo": @@ -9099,7 +8572,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9114,19 +8587,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_a_true_and_a1_are_unique_passes # {"a": true} and {"a": 1} are unique with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "a": @@ -9139,7 +8610,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9154,19 +8625,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_non_unique_heterogeneous_types_are_invalid_fails # non-unique heterogeneous types are invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { }, @@ -9182,18 +8651,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ], + payload, _configuration=self._configuration ) self.api.post_uniqueitems_validation_request_body(body=body) @@ -9201,7 +8659,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_nested0_and_false_are_unique_passes # nested [0] and [false] are unique with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ [ @@ -9218,7 +8676,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9233,19 +8691,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_a_false_and_a0_are_unique_passes # {"a": false} and {"a": 0} are unique with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "a": @@ -9258,7 +8714,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9273,19 +8729,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_numbers_are_unique_if_mathematically_unequal_fails # numbers are unique if mathematically unequal with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1.0, 1.0, @@ -9294,11 +8748,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1.0, - 1.0, - 1, - ], + payload, _configuration=self._configuration ) self.api.post_uniqueitems_validation_request_body(body=body) @@ -9306,14 +8756,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_false_is_not_equal_to_zero_passes # false is not equal to zero with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 0, False, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9328,19 +8778,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_0_and_false_are_unique_passes # [0] and [false] are unique with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ 0, @@ -9351,7 +8799,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9366,19 +8814,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_unique_array_of_arrays_is_valid_passes # unique array of arrays is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ "foo", @@ -9389,7 +8835,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9404,19 +8850,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_non_unique_array_of_nested_objects_is_invalid_fails # non-unique array of nested objects is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "foo": @@ -9442,28 +8886,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ], + payload, _configuration=self._configuration ) self.api.post_uniqueitems_validation_request_body(body=body) @@ -9471,7 +8894,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_non_unique_array_of_more_than_two_integers_is_invalid_fails # non-unique array of more than two integers is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, 2, @@ -9480,11 +8903,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1, - 2, - 1, - ], + payload, _configuration=self._configuration ) self.api.post_uniqueitems_validation_request_body(body=body) @@ -9492,14 +8911,14 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_true_is_not_equal_to_one_passes # true is not equal to one with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, True, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9514,19 +8933,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_objects_are_non_unique_despite_key_order_fails # objects are non-unique despite key order with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "a": @@ -9544,20 +8961,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "a": - 1, - "b": - 2, - }, - { - "b": - 2, - "a": - 1, - }, - ], + payload, _configuration=self._configuration ) self.api.post_uniqueitems_validation_request_body(body=body) @@ -9565,7 +8969,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_unique_array_of_strings_is_valid_passes # unique array of strings is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ "foo", "bar", @@ -9573,7 +8977,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9588,19 +8992,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_1_and_true_are_unique_passes # [1] and [true] are unique with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ 1, @@ -9611,7 +9013,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9626,19 +9028,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_different_objects_are_unique_passes # different objects are unique with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "a": @@ -9655,7 +9055,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9670,26 +9070,24 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_unique_array_of_integers_is_valid_passes # unique array of integers is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, 2, ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9704,19 +9102,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_non_unique_array_of_more_than_two_arrays_is_invalid_fails # non-unique array of more than two arrays is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ "foo", @@ -9731,17 +9127,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - "foo", - ], - [ - "bar", - ], - [ - "foo", - ], - ], + payload, _configuration=self._configuration ) self.api.post_uniqueitems_validation_request_body(body=body) @@ -9749,7 +9135,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_non_unique_array_of_objects_is_invalid_fails # non-unique array of objects is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "foo": @@ -9763,16 +9149,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ], + payload, _configuration=self._configuration ) self.api.post_uniqueitems_validation_request_body(body=body) @@ -9780,7 +9157,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_unique_array_of_nested_objects_is_valid_passes # unique array of nested objects is valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { "foo": @@ -9805,7 +9182,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9820,19 +9197,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_non_unique_array_of_arrays_is_invalid_fails # non-unique array of arrays is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ "foo", @@ -9844,14 +9219,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - "foo", - ], - [ - "foo", - ], - ], + payload, _configuration=self._configuration ) self.api.post_uniqueitems_validation_request_body(body=body) @@ -9859,7 +9227,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_non_unique_array_of_strings_is_invalid_fails # non-unique array of strings is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ "foo", "bar", @@ -9868,11 +9236,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - "foo", - "bar", - "foo", - ], + payload, _configuration=self._configuration ) self.api.post_uniqueitems_validation_request_body(body=body) @@ -9880,7 +9244,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_nested1_and_true_are_unique_passes # nested [1] and [true] are unique with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ [ [ @@ -9897,7 +9261,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9912,19 +9276,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_unique_heterogeneous_types_are_valid_passes # unique heterogeneous types are valid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ { }, @@ -9938,7 +9300,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -9953,19 +9315,17 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_non_unique_array_of_integers_is_invalid_fails # non-unique array of integers is invalid with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ 1, 1, @@ -9973,10 +9333,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): ) with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1, - 1, - ], + payload, _configuration=self._configuration ) self.api.post_uniqueitems_validation_request_body(body=body) @@ -9987,7 +9344,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_uri_format_request_body """ - from unit_test_api.api.post_api_endpoints import post_uri_format_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_uri_format_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -9995,12 +9352,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_all_string_formats_ignore_objects_passes # all string formats ignore objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10015,23 +9372,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_booleans_passes # all string formats ignore booleans with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10046,23 +9401,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_integers_passes # all string formats ignore integers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10077,23 +9430,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_floats_passes # all string formats ignore floats with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 13.7 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10108,24 +9459,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_arrays_passes # all string formats ignore arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10140,23 +9489,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_nulls_passes # all string formats ignore nulls with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10171,13 +9518,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -10186,7 +9531,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_uri_reference_format_request_body """ - from unit_test_api.api.post_api_endpoints import post_uri_reference_format_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_uri_reference_format_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -10194,12 +9539,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_all_string_formats_ignore_objects_passes # all string formats ignore objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10214,23 +9559,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_booleans_passes # all string formats ignore booleans with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10245,23 +9588,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_integers_passes # all string formats ignore integers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10276,23 +9617,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_floats_passes # all string formats ignore floats with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 13.7 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10307,24 +9646,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_arrays_passes # all string formats ignore arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10339,23 +9676,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_nulls_passes # all string formats ignore nulls with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10370,13 +9705,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) @@ -10385,7 +9718,7 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): """Test case for post_uri_template_format_request_body """ - from unit_test_api.api.post_api_endpoints import post_uri_template_format_request_body as endpoint_module + from unit_test_api.api.operation_request_body_api_endpoints import post_uri_template_format_request_body as endpoint_module response_status = 200 response_body = '' content_type = 'application/json' @@ -10393,12 +9726,12 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): # test_all_string_formats_ignore_objects_passes # all string formats ignore objects with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( { } ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10413,23 +9746,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_booleans_passes # all string formats ignore booleans with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( False ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10444,23 +9775,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_integers_passes # all string formats ignore integers with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 12 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10475,23 +9804,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_floats_passes # all string formats ignore floats with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( 13.7 ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10506,24 +9833,22 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_arrays_passes # all string formats ignore arrays with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( [ ] ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10538,23 +9863,21 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) # test_all_string_formats_ignore_nulls_passes # all string formats ignore nulls with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( + payload = ( None ) body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, + payload, _configuration=self._configuration ) mock_request.return_value = self.response( @@ -10569,13 +9892,11 @@ class TestPostApi(ApiTestMixin, unittest.TestCase): mock_request, self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', method='POST', - body=self.json_bytes(request_payload), + body=self.json_bytes(payload), content_type=content_type, - accept_content_type=None, ) assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here assert isinstance(api_response.body, schemas.Unset) diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_path_post_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_path_post_api.py new file mode 100644 index 00000000000..2c99efa8e91 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_path_post_api.py @@ -0,0 +1,20900 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + + The version of the OpenAPI document: 0.0.1 + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import unit_test_api +from unit_test_api.api.path_post_api import PathPostApi # noqa: E501 +from unit_test_api import configuration, schemas, api_client + +from . import ApiTestMixin + + +class TestPathPostApi(ApiTestMixin, unittest.TestCase): + """PathPostApi unit test stubs""" + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = PathPostApi(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + def test_post_additionalproperties_allows_a_schema_which_should_validate_request_body(self): + """Test case for post_additionalproperties_allows_a_schema_which_should_validate_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_additionalproperties_allows_a_schema_which_should_validate_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_no_additional_properties_is_valid_passes + # no additional properties is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_additional_invalid_property_is_invalid_fails + # an additional invalid property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + 12, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body(body=body) + + # test_an_additional_valid_property_is_valid_passes + # an additional valid property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + True, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types(self): + """Test case for post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_no_additional_properties_is_valid_passes + # no additional properties is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_additional_invalid_property_is_invalid_fails + # an additional invalid property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + 12, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_additional_valid_property_is_valid_passes + # an additional valid property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_additionalproperties_are_allowed_by_default_request_body(self): + """Test case for post_additionalproperties_are_allowed_by_default_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_additionalproperties_are_allowed_by_default_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_additional_properties_are_allowed_passes + # additional properties are allowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + True, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_additionalproperties_are_allowed_by_default_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_additionalproperties_are_allowed_by_default_response_body_for_content_types(self): + """Test case for post_additionalproperties_are_allowed_by_default_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_additionalproperties_are_allowed_by_default_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_additional_properties_are_allowed_passes + # additional properties are allowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_additionalproperties_can_exist_by_itself_request_body(self): + """Test case for post_additionalproperties_can_exist_by_itself_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_additionalproperties_can_exist_by_itself_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_an_additional_invalid_property_is_invalid_fails + # an additional invalid property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_additionalproperties_can_exist_by_itself_request_body(body=body) + + # test_an_additional_valid_property_is_valid_passes + # an additional valid property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + True, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_additionalproperties_can_exist_by_itself_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_additionalproperties_can_exist_by_itself_response_body_for_content_types(self): + """Test case for post_additionalproperties_can_exist_by_itself_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_additionalproperties_can_exist_by_itself_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_additional_invalid_property_is_invalid_fails + # an additional invalid property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_additional_valid_property_is_valid_passes + # an additional valid property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_additionalproperties_should_not_look_in_applicators_request_body(self): + """Test case for post_additionalproperties_should_not_look_in_applicators_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_additionalproperties_should_not_look_in_applicators_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_properties_defined_in_allof_are_not_examined_fails + # properties defined in allOf are not examined + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + True, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_additionalproperties_should_not_look_in_applicators_request_body(body=body) + + # test_valid_test_case_passes + # valid test case + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + False, + "bar": + True, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_additionalproperties_should_not_look_in_applicators_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types(self): + """Test case for post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_properties_defined_in_allof_are_not_examined_fails + # properties defined in allOf are not examined + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_valid_test_case_passes + # valid test case + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + False, + "bar": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_combined_with_anyof_oneof_request_body(self): + """Test case for post_allof_combined_with_anyof_oneof_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_combined_with_anyof_oneof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_allof_true_anyof_false_oneof_false_fails + # allOf: true, anyOf: false, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_false_anyof_false_oneof_true_fails + # allOf: false, anyOf: false, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 5 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_false_anyof_true_oneof_true_fails + # allOf: false, anyOf: true, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 15 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_true_anyof_true_oneof_false_fails + # allOf: true, anyOf: true, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 6 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_true_anyof_true_oneof_true_passes + # allOf: true, anyOf: true, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 30 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_combined_with_anyof_oneof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofCombinedWithAnyofOneofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_allof_true_anyof_false_oneof_true_fails + # allOf: true, anyOf: false, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 10 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_false_anyof_true_oneof_false_fails + # allOf: false, anyOf: true, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + # test_allof_false_anyof_false_oneof_false_fails + # allOf: false, anyOf: false, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) + + + + def test_post_allof_combined_with_anyof_oneof_response_body_for_content_types(self): + """Test case for post_allof_combined_with_anyof_oneof_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_combined_with_anyof_oneof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_allof_true_anyof_false_oneof_false_fails + # allOf: true, anyOf: false, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_false_oneof_true_fails + # allOf: false, anyOf: false, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_true_oneof_true_fails + # allOf: false, anyOf: true, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 15 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_true_anyof_true_oneof_false_fails + # allOf: true, anyOf: true, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_true_anyof_true_oneof_true_passes + # allOf: true, anyOf: true, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 30 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_allof_true_anyof_false_oneof_true_fails + # allOf: true, anyOf: false, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 10 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_true_oneof_false_fails + # allOf: false, anyOf: true, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_false_oneof_false_fails + # allOf: false, anyOf: false, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_request_body(self): + """Test case for post_allof_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_allof_passes + # allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_mismatch_first_fails + # mismatch first + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_request_body(body=body) + + # test_mismatch_second_fails + # mismatch second + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_request_body(body=body) + + # test_wrong_type_fails + # wrong type + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + "quux", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_request_body(body=body) + + + + def test_post_allof_response_body_for_content_types(self): + """Test case for post_allof_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_allof_passes + # allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_first_fails + # mismatch first + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_second_fails + # mismatch second + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_wrong_type_fails + # wrong type + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + "quux", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_simple_types_request_body(self): + """Test case for post_allof_simple_types_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_simple_types_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_valid_passes + # valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 25 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_simple_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofSimpleTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_mismatch_one_fails + # mismatch one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 35 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_simple_types_request_body(body=body) + + + + def test_post_allof_simple_types_response_body_for_content_types(self): + """Test case for post_allof_simple_types_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_simple_types_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_passes + # valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 25 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_simple_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofSimpleTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_one_fails + # mismatch one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 35 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_simple_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofSimpleTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_with_base_schema_request_body(self): + """Test case for post_allof_with_base_schema_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_with_base_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_valid_passes + # valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "bar": + 2, + "baz": + None, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_with_base_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofWithBaseSchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_mismatch_first_allof_fails + # mismatch first allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + "baz": + None, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_base_schema_request_body(body=body) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "baz": + None, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_base_schema_request_body(body=body) + + # test_mismatch_both_fails + # mismatch both + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_base_schema_request_body(body=body) + + # test_mismatch_second_allof_fails + # mismatch second allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "bar": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_base_schema_request_body(body=body) + + + + def test_post_allof_with_base_schema_response_body_for_content_types(self): + """Test case for post_allof_with_base_schema_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_with_base_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_passes + # valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "bar": + 2, + "baz": + None, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_first_allof_fails + # mismatch first allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + "baz": + None, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "baz": + None, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_both_fails + # mismatch both + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_second_allof_fails + # mismatch second allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_with_one_empty_schema_request_body(self): + """Test case for post_allof_with_one_empty_schema_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_with_one_empty_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_any_data_is_valid_passes + # any data is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_with_one_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofWithOneEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_allof_with_one_empty_schema_response_body_for_content_types(self): + """Test case for post_allof_with_one_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_with_one_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_any_data_is_valid_passes + # any data is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_one_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_with_the_first_empty_schema_request_body(self): + """Test case for post_allof_with_the_first_empty_schema_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_with_the_first_empty_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_string_is_invalid_fails + # string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_the_first_empty_schema_request_body(body=body) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_with_the_first_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofWithTheFirstEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_allof_with_the_first_empty_schema_response_body_for_content_types(self): + """Test case for post_allof_with_the_first_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_with_the_first_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_string_is_invalid_fails + # string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_the_first_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_the_first_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_with_the_last_empty_schema_request_body(self): + """Test case for post_allof_with_the_last_empty_schema_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_with_the_last_empty_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_string_is_invalid_fails + # string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_allof_with_the_last_empty_schema_request_body(body=body) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_with_the_last_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofWithTheLastEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_allof_with_the_last_empty_schema_response_body_for_content_types(self): + """Test case for post_allof_with_the_last_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_with_the_last_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_string_is_invalid_fails + # string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_the_last_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_the_last_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_with_two_empty_schemas_request_body(self): + """Test case for post_allof_with_two_empty_schemas_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_with_two_empty_schemas_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_any_data_is_valid_passes + # any data is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_allof_with_two_empty_schemas_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAllofWithTwoEmptySchemasRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_allof_with_two_empty_schemas_response_body_for_content_types(self): + """Test case for post_allof_with_two_empty_schemas_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_allof_with_two_empty_schemas_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_any_data_is_valid_passes + # any data is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_two_empty_schemas_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_anyof_complex_types_request_body(self): + """Test case for post_anyof_complex_types_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_anyof_complex_types_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_second_anyof_valid_complex_passes + # second anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_neither_anyof_valid_complex_fails + # neither anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 2, + "bar": + "quux", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_anyof_complex_types_request_body(body=body) + + # test_both_anyof_valid_complex_passes + # both anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_first_anyof_valid_complex_passes + # first anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_anyof_complex_types_response_body_for_content_types(self): + """Test case for post_anyof_complex_types_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_anyof_complex_types_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_second_anyof_valid_complex_passes + # second anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_anyof_valid_complex_fails + # neither anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 2, + "bar": + "quux", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_anyof_valid_complex_passes + # both anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_first_anyof_valid_complex_passes + # first anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_anyof_request_body(self): + """Test case for post_anyof_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_anyof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_second_anyof_valid_passes + # second anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.5 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_neither_anyof_valid_fails + # neither anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.5 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_anyof_request_body(body=body) + + # test_both_anyof_valid_passes + # both anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_first_anyof_valid_passes + # first anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_anyof_response_body_for_content_types(self): + """Test case for post_anyof_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_anyof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_second_anyof_valid_passes + # second anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_anyof_valid_fails + # neither anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_anyof_valid_passes + # both anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_first_anyof_valid_passes + # first anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_anyof_with_base_schema_request_body(self): + """Test case for post_anyof_with_base_schema_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_anyof_with_base_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_one_anyof_valid_passes + # one anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_with_base_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofWithBaseSchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_both_anyof_invalid_fails + # both anyOf invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_anyof_with_base_schema_request_body(body=body) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_anyof_with_base_schema_request_body(body=body) + + + + def test_post_anyof_with_base_schema_response_body_for_content_types(self): + """Test case for post_anyof_with_base_schema_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_anyof_with_base_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_one_anyof_valid_passes + # one anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_both_anyof_invalid_fails + # both anyOf invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_anyof_with_one_empty_schema_request_body(self): + """Test case for post_anyof_with_one_empty_schema_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_anyof_with_one_empty_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_string_is_valid_passes + # string is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_with_one_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_anyof_with_one_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_anyof_with_one_empty_schema_response_body_for_content_types(self): + """Test case for post_anyof_with_one_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_anyof_with_one_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_string_is_valid_passes + # string is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_with_one_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_with_one_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_array_type_matches_arrays_request_body(self): + """Test case for post_array_type_matches_arrays_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_array_type_matches_arrays_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_a_float_is_not_an_array_fails + # a float is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + # test_a_boolean_is_not_an_array_fails + # a boolean is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + # test_null_is_not_an_array_fails + # null is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + # test_an_object_is_not_an_array_fails + # an object is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + # test_a_string_is_not_an_array_fails + # a string is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + # test_an_array_is_an_array_passes + # an array is an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_array_type_matches_arrays_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postArrayTypeMatchesArraysRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_integer_is_not_an_array_fails + # an integer is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_array_type_matches_arrays_request_body(body=body) + + + + def test_post_array_type_matches_arrays_response_body_for_content_types(self): + """Test case for post_array_type_matches_arrays_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_array_type_matches_arrays_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_a_float_is_not_an_array_fails + # a float is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_an_array_fails + # a boolean is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_an_array_fails + # null is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_an_array_fails + # an object is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_an_array_fails + # a string is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_an_array_passes + # an array is an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_integer_is_not_an_array_fails + # an integer is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_boolean_type_matches_booleans_request_body(self): + """Test case for post_boolean_type_matches_booleans_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_boolean_type_matches_booleans_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_an_empty_string_is_not_a_boolean_fails + # an empty string is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_a_float_is_not_a_boolean_fails + # a float is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_null_is_not_a_boolean_fails + # null is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_zero_is_not_a_boolean_fails + # zero is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_an_array_is_not_a_boolean_fails + # an array is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_a_string_is_not_a_boolean_fails + # a string is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_false_is_a_boolean_passes + # false is a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_boolean_type_matches_booleans_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_integer_is_not_a_boolean_fails + # an integer is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + # test_true_is_a_boolean_passes + # true is a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_boolean_type_matches_booleans_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_object_is_not_a_boolean_fails + # an object is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_boolean_type_matches_booleans_request_body(body=body) + + + + def test_post_boolean_type_matches_booleans_response_body_for_content_types(self): + """Test case for post_boolean_type_matches_booleans_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_boolean_type_matches_booleans_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_empty_string_is_not_a_boolean_fails + # an empty string is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_float_is_not_a_boolean_fails + # a float is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_a_boolean_fails + # null is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_zero_is_not_a_boolean_fails + # zero is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_a_boolean_fails + # an array is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_a_boolean_fails + # a string is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_false_is_a_boolean_passes + # false is a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_integer_is_not_a_boolean_fails + # an integer is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_a_boolean_passes + # true is a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_object_is_not_a_boolean_fails + # an object is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_by_int_request_body(self): + """Test case for post_by_int_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_by_int_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_int_by_int_fail_fails + # int by int fail + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 7 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_by_int_request_body(body=body) + + # test_int_by_int_passes + # int by int + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 10 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_by_int_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postByIntRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_by_int_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postByIntRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_by_int_response_body_for_content_types(self): + """Test case for post_by_int_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_by_int_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_int_by_int_fail_fails + # int by int fail + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_by_int_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_int_by_int_passes + # int by int + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 10 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_int_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_int_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_by_number_request_body(self): + """Test case for post_by_number_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_by_number_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_45_is_multiple_of15_passes + # 4.5 is multiple of 1.5 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 4.5 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_by_number_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postByNumberRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_35_is_not_multiple_of15_fails + # 35 is not multiple of 1.5 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 35 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_by_number_request_body(body=body) + + # test_zero_is_multiple_of_anything_passes + # zero is multiple of anything + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_by_number_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postByNumberRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_by_number_response_body_for_content_types(self): + """Test case for post_by_number_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_by_number_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_45_is_multiple_of15_passes + # 4.5 is multiple of 1.5 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 4.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_35_is_not_multiple_of15_fails + # 35 is not multiple of 1.5 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 35 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_by_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_zero_is_multiple_of_anything_passes + # zero is multiple of anything + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_by_small_number_request_body(self): + """Test case for post_by_small_number_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_by_small_number_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_000751_is_not_multiple_of00001_fails + # 0.00751 is not multiple of 0.0001 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.00751 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_by_small_number_request_body(body=body) + + # test_00075_is_multiple_of00001_passes + # 0.0075 is multiple of 0.0001 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0075 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_by_small_number_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postBySmallNumberRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_by_small_number_response_body_for_content_types(self): + """Test case for post_by_small_number_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_by_small_number_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_000751_is_not_multiple_of00001_fails + # 0.00751 is not multiple of 0.0001 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.00751 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_by_small_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBySmallNumberResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_00075_is_multiple_of00001_passes + # 0.0075 is multiple of 0.0001 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0075 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_small_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBySmallNumberResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_date_time_format_request_body(self): + """Test case for post_date_time_format_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_date_time_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_date_time_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_date_time_format_response_body_for_content_types(self): + """Test case for post_date_time_format_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_date_time_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_email_format_request_body(self): + """Test case for post_email_format_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_email_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_email_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEmailFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_email_format_response_body_for_content_types(self): + """Test case for post_email_format_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_email_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_enum_with0_does_not_match_false_request_body(self): + """Test case for post_enum_with0_does_not_match_false_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_enum_with0_does_not_match_false_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_integer_zero_is_valid_passes + # integer zero is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with0_does_not_match_false_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_float_zero_is_valid_passes + # float zero is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with0_does_not_match_false_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_false_is_invalid_fails + # false is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with0_does_not_match_false_request_body(body=body) + + + + def test_post_enum_with0_does_not_match_false_response_body_for_content_types(self): + """Test case for post_enum_with0_does_not_match_false_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_enum_with0_does_not_match_false_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_integer_zero_is_valid_passes + # integer zero is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with0_does_not_match_false_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_float_zero_is_valid_passes + # float zero is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with0_does_not_match_false_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_false_is_invalid_fails + # false is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with0_does_not_match_false_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enum_with1_does_not_match_true_request_body(self): + """Test case for post_enum_with1_does_not_match_true_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_enum_with1_does_not_match_true_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_true_is_invalid_fails + # true is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with1_does_not_match_true_request_body(body=body) + + # test_integer_one_is_valid_passes + # integer one is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with1_does_not_match_true_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_float_one_is_valid_passes + # float one is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with1_does_not_match_true_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_enum_with1_does_not_match_true_response_body_for_content_types(self): + """Test case for post_enum_with1_does_not_match_true_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_enum_with1_does_not_match_true_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_true_is_invalid_fails + # true is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with1_does_not_match_true_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_integer_one_is_valid_passes + # integer one is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with1_does_not_match_true_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_float_one_is_valid_passes + # float one is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with1_does_not_match_true_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_enum_with_escaped_characters_request_body(self): + """Test case for post_enum_with_escaped_characters_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_enum_with_escaped_characters_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_member2_is_valid_passes + # member 2 is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo\rbar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with_escaped_characters_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_member1_is_valid_passes + # member 1 is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo\nbar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with_escaped_characters_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_another_string_is_invalid_fails + # another string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "abc" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with_escaped_characters_request_body(body=body) + + + + def test_post_enum_with_escaped_characters_response_body_for_content_types(self): + """Test case for post_enum_with_escaped_characters_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_enum_with_escaped_characters_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_member2_is_valid_passes + # member 2 is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo\rbar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_member1_is_valid_passes + # member 1 is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo\nbar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_another_string_is_invalid_fails + # another string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "abc" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enum_with_false_does_not_match0_request_body(self): + """Test case for post_enum_with_false_does_not_match0_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_enum_with_false_does_not_match0_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_false_is_valid_passes + # false is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with_false_does_not_match0_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWithFalseDoesNotMatch0RequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_float_zero_is_invalid_fails + # float zero is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with_false_does_not_match0_request_body(body=body) + + # test_integer_zero_is_invalid_fails + # integer zero is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with_false_does_not_match0_request_body(body=body) + + + + def test_post_enum_with_false_does_not_match0_response_body_for_content_types(self): + """Test case for post_enum_with_false_does_not_match0_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_enum_with_false_does_not_match0_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_false_is_valid_passes + # false is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_false_does_not_match0_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_float_zero_is_invalid_fails + # float zero is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_false_does_not_match0_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_integer_zero_is_invalid_fails + # integer zero is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_false_does_not_match0_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enum_with_true_does_not_match1_request_body(self): + """Test case for post_enum_with_true_does_not_match1_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_enum_with_true_does_not_match1_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_float_one_is_invalid_fails + # float one is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with_true_does_not_match1_request_body(body=body) + + # test_true_is_valid_passes + # true is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enum_with_true_does_not_match1_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumWithTrueDoesNotMatch1RequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_integer_one_is_invalid_fails + # integer one is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enum_with_true_does_not_match1_request_body(body=body) + + + + def test_post_enum_with_true_does_not_match1_response_body_for_content_types(self): + """Test case for post_enum_with_true_does_not_match1_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_enum_with_true_does_not_match1_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_float_one_is_invalid_fails + # float one is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_true_does_not_match1_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_valid_passes + # true is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_true_does_not_match1_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_integer_one_is_invalid_fails + # integer one is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_true_does_not_match1_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enums_in_properties_request_body(self): + """Test case for post_enums_in_properties_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_enums_in_properties_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_missing_optional_property_is_valid_passes + # missing optional property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + "bar", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enums_in_properties_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_wrong_foo_value_fails + # wrong foo value + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foot", + "bar": + "bar", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enums_in_properties_request_body(body=body) + + # test_both_properties_are_valid_passes + # both properties are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + "bar": + "bar", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_enums_in_properties_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_wrong_bar_value_fails + # wrong bar value + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + "bar": + "bart", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enums_in_properties_request_body(body=body) + + # test_missing_all_properties_is_invalid_fails + # missing all properties is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enums_in_properties_request_body(body=body) + + # test_missing_required_property_is_invalid_fails + # missing required property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_enums_in_properties_request_body(body=body) + + + + def test_post_enums_in_properties_response_body_for_content_types(self): + """Test case for post_enums_in_properties_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_enums_in_properties_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_missing_optional_property_is_valid_passes + # missing optional property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_wrong_foo_value_fails + # wrong foo value + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foot", + "bar": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_properties_are_valid_passes + # both properties are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + "bar": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_wrong_bar_value_fails + # wrong bar value + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + "bar": + "bart", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_missing_all_properties_is_invalid_fails + # missing all properties is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_missing_required_property_is_invalid_fails + # missing required property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_forbidden_property_request_body(self): + """Test case for post_forbidden_property_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_forbidden_property_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_present_fails + # property present + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_forbidden_property_request_body(body=body) + + # test_property_absent_passes + # property absent + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 1, + "baz": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_forbidden_property_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postForbiddenPropertyRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_forbidden_property_response_body_for_content_types(self): + """Test case for post_forbidden_property_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_forbidden_property_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_present_fails + # property present + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_forbidden_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postForbiddenPropertyResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_property_absent_passes + # property absent + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 1, + "baz": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_forbidden_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postForbiddenPropertyResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_hostname_format_request_body(self): + """Test case for post_hostname_format_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_hostname_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_hostname_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postHostnameFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_hostname_format_response_body_for_content_types(self): + """Test case for post_hostname_format_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_hostname_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_integer_type_matches_integers_request_body(self): + """Test case for post_integer_type_matches_integers_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_integer_type_matches_integers_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_an_object_is_not_an_integer_fails + # an object is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_a_string_is_not_an_integer_fails + # a string is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_null_is_not_an_integer_fails + # null is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_a_float_with_zero_fractional_part_is_an_integer_passes + # a float with zero fractional part is an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_integer_type_matches_integers_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_float_is_not_an_integer_fails + # a float is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_a_boolean_is_not_an_integer_fails + # a boolean is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_an_integer_is_an_integer_passes + # an integer is an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_integer_type_matches_integers_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails + # a string is still not an integer, even if it looks like one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + # test_an_array_is_not_an_integer_fails + # an array is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_integer_type_matches_integers_request_body(body=body) + + + + def test_post_integer_type_matches_integers_response_body_for_content_types(self): + """Test case for post_integer_type_matches_integers_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_integer_type_matches_integers_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_object_is_not_an_integer_fails + # an object is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_an_integer_fails + # a string is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_an_integer_fails + # null is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_float_with_zero_fractional_part_is_an_integer_passes + # a float with zero fractional part is an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_float_is_not_an_integer_fails + # a float is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_an_integer_fails + # a boolean is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_an_integer_passes + # an integer is an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails + # a string is still not an integer, even if it looks like one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_an_integer_fails + # an array is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(self): + """Test case for post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails + # always invalid, but naive implementations may raise an overflow error + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0E308 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body=body) + + # test_valid_integer_with_multipleof_float_passes + # valid integer with multipleOf float + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123456789 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types(self): + """Test case for post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails + # always invalid, but naive implementations may raise an overflow error + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0E308 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_valid_integer_with_multipleof_float_passes + # valid integer with multipleOf float + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123456789 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_invalid_string_value_for_default_request_body(self): + """Test case for post_invalid_string_value_for_default_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_invalid_string_value_for_default_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_valid_when_property_is_specified_passes + # valid when property is specified + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + "good", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_invalid_string_value_for_default_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_still_valid_when_the_invalid_default_is_used_passes + # still valid when the invalid default is used + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_invalid_string_value_for_default_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_invalid_string_value_for_default_response_body_for_content_types(self): + """Test case for post_invalid_string_value_for_default_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_invalid_string_value_for_default_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_when_property_is_specified_passes + # valid when property is specified + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + "good", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_invalid_string_value_for_default_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_still_valid_when_the_invalid_default_is_used_passes + # still valid when the invalid default is used + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_invalid_string_value_for_default_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_ipv4_format_request_body(self): + """Test case for post_ipv4_format_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_ipv4_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv4_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv4FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_ipv4_format_response_body_for_content_types(self): + """Test case for post_ipv4_format_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_ipv4_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_ipv6_format_request_body(self): + """Test case for post_ipv6_format_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_ipv6_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ipv6_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postIpv6FormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_ipv6_format_response_body_for_content_types(self): + """Test case for post_ipv6_format_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_ipv6_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_json_pointer_format_request_body(self): + """Test case for post_json_pointer_format_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_json_pointer_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_json_pointer_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_json_pointer_format_response_body_for_content_types(self): + """Test case for post_json_pointer_format_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_json_pointer_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maximum_validation_request_body(self): + """Test case for post_maximum_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_maximum_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_below_the_maximum_is_valid_passes + # below the maximum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.6 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_above_the_maximum_is_invalid_fails + # above the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3.5 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maximum_validation_request_body(body=body) + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_maximum_validation_response_body_for_content_types(self): + """Test case for post_maximum_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_maximum_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_below_the_maximum_is_valid_passes + # below the maximum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_above_the_maximum_is_invalid_fails + # above the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maximum_validation_with_unsigned_integer_request_body(self): + """Test case for post_maximum_validation_with_unsigned_integer_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_maximum_validation_with_unsigned_integer_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_below_the_maximum_is_invalid_passes + # below the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 299.97 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_above_the_maximum_is_invalid_fails + # above the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300.5 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maximum_validation_with_unsigned_integer_request_body(body=body) + + # test_boundary_point_integer_is_valid_passes + # boundary point integer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_boundary_point_float_is_valid_passes + # boundary point float is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_maximum_validation_with_unsigned_integer_response_body_for_content_types(self): + """Test case for post_maximum_validation_with_unsigned_integer_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_maximum_validation_with_unsigned_integer_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_below_the_maximum_is_invalid_passes + # below the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 299.97 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_above_the_maximum_is_invalid_fails + # above the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_boundary_point_integer_is_valid_passes + # boundary point integer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_boundary_point_float_is_valid_passes + # boundary point float is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maxitems_validation_request_body(self): + """Test case for post_maxitems_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_maxitems_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 3, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maxitems_validation_request_body(body=body) + + # test_ignores_non_arrays_passes + # ignores non-arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_maxitems_validation_response_body_for_content_types(self): + """Test case for post_maxitems_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_maxitems_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 3, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_arrays_passes + # ignores non-arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maxlength_validation_request_body(self): + """Test case for post_maxlength_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_maxlength_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maxlength_validation_request_body(body=body) + + # test_ignores_non_strings_passes + # ignores non-strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 100 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "f" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_two_supplementary_unicode_code_points_is_long_enough_passes + # two supplementary Unicode code points is long enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "💩💩" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "fo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_maxlength_validation_response_body_for_content_types(self): + """Test case for post_maxlength_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_maxlength_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_strings_passes + # ignores non-strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 100 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "f" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_two_supplementary_unicode_code_points_is_long_enough_passes + # two supplementary Unicode code points is long enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "💩💩" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "fo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maxproperties0_means_the_object_is_empty_request_body(self): + """Test case for post_maxproperties0_means_the_object_is_empty_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_maxproperties0_means_the_object_is_empty_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_no_properties_is_valid_passes + # no properties is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties0_means_the_object_is_empty_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_one_property_is_invalid_fails + # one property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maxproperties0_means_the_object_is_empty_request_body(body=body) + + + + def test_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types(self): + """Test case for post_maxproperties0_means_the_object_is_empty_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_maxproperties0_means_the_object_is_empty_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_no_properties_is_valid_passes + # no properties is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_one_property_is_invalid_fails + # one property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_maxproperties_validation_request_body(self): + """Test case for post_maxproperties_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_maxproperties_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "baz": + 3, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_maxproperties_validation_request_body(body=body) + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 3, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_maxproperties_validation_response_body_for_content_types(self): + """Test case for post_maxproperties_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_maxproperties_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "baz": + 3, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 3, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minimum_validation_request_body(self): + """Test case for post_minimum_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_minimum_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_below_the_minimum_is_invalid_fails + # below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.6 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minimum_validation_request_body(body=body) + + # test_above_the_minimum_is_valid_passes + # above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.6 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_minimum_validation_response_body_for_content_types(self): + """Test case for post_minimum_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_minimum_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_below_the_minimum_is_invalid_fails + # below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_above_the_minimum_is_valid_passes + # above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minimum_validation_with_signed_integer_request_body(self): + """Test case for post_minimum_validation_with_signed_integer_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_minimum_validation_with_signed_integer_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_positive_above_the_minimum_is_valid_passes + # positive above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_int_below_the_minimum_is_invalid_fails + # int below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -3 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minimum_validation_with_signed_integer_request_body(body=body) + + # test_float_below_the_minimum_is_invalid_fails + # float below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2.0001 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minimum_validation_with_signed_integer_request_body(body=body) + + # test_boundary_point_with_float_is_valid_passes + # boundary point with float is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_negative_above_the_minimum_is_valid_passes + # negative above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_minimum_validation_with_signed_integer_response_body_for_content_types(self): + """Test case for post_minimum_validation_with_signed_integer_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_minimum_validation_with_signed_integer_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_positive_above_the_minimum_is_valid_passes + # positive above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_int_below_the_minimum_is_invalid_fails + # int below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_float_below_the_minimum_is_invalid_fails + # float below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2.0001 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_boundary_point_with_float_is_valid_passes + # boundary point with float is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_negative_above_the_minimum_is_valid_passes + # negative above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minitems_validation_request_body(self): + """Test case for post_minitems_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_minitems_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minitems_validation_request_body(body=body) + + # test_ignores_non_arrays_passes + # ignores non-arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_minitems_validation_response_body_for_content_types(self): + """Test case for post_minitems_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_minitems_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_arrays_passes + # ignores non-arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minlength_validation_request_body(self): + """Test case for post_minlength_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_minlength_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "f" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minlength_validation_request_body(body=body) + + # test_one_supplementary_unicode_code_point_is_not_long_enough_fails + # one supplementary Unicode code point is not long enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "💩" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minlength_validation_request_body(body=body) + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_non_strings_passes + # ignores non-strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "fo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minlength_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_minlength_validation_response_body_for_content_types(self): + """Test case for post_minlength_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_minlength_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "f" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_supplementary_unicode_code_point_is_not_long_enough_fails + # one supplementary Unicode code point is not long enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "💩" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_strings_passes + # ignores non-strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "fo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minproperties_validation_request_body(self): + """Test case for post_minproperties_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_minproperties_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_minproperties_validation_request_body(body=body) + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_minproperties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_minproperties_validation_response_body_for_content_types(self): + """Test case for post_minproperties_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_minproperties_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_nested_allof_to_check_validation_semantics_request_body(self): + """Test case for post_nested_allof_to_check_validation_semantics_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_nested_allof_to_check_validation_semantics_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nested_allof_to_check_validation_semantics_request_body(body=body) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_nested_allof_to_check_validation_semantics_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_nested_allof_to_check_validation_semantics_response_body_for_content_types(self): + """Test case for post_nested_allof_to_check_validation_semantics_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_nested_allof_to_check_validation_semantics_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_nested_anyof_to_check_validation_semantics_request_body(self): + """Test case for post_nested_anyof_to_check_validation_semantics_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_nested_anyof_to_check_validation_semantics_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nested_anyof_to_check_validation_semantics_request_body(body=body) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_nested_anyof_to_check_validation_semantics_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types(self): + """Test case for post_nested_anyof_to_check_validation_semantics_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_nested_anyof_to_check_validation_semantics_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_nested_items_request_body(self): + """Test case for post_nested_items_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_nested_items_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_valid_nested_array_passes + # valid nested array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + [ + 1, + ], + ], + [ + [ + 2, + ], + [ + 3, + ], + ], + ], + [ + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_nested_items_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNestedItemsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_nested_array_with_invalid_type_fails + # nested array with invalid type + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + [ + "1", + ], + ], + [ + [ + 2, + ], + [ + 3, + ], + ], + ], + [ + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ], + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nested_items_request_body(body=body) + + # test_not_deep_enough_fails + # not deep enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 1, + ], + [ + 2, + ], + [ + 3, + ], + ], + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nested_items_request_body(body=body) + + + + def test_post_nested_items_response_body_for_content_types(self): + """Test case for post_nested_items_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_nested_items_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_nested_array_passes + # valid nested array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + [ + 1, + ], + ], + [ + [ + 2, + ], + [ + 3, + ], + ], + ], + [ + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_nested_array_with_invalid_type_fails + # nested array with invalid type + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + [ + "1", + ], + ], + [ + [ + 2, + ], + [ + 3, + ], + ], + ], + [ + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_not_deep_enough_fails + # not deep enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 1, + ], + [ + 2, + ], + [ + 3, + ], + ], + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_nested_oneof_to_check_validation_semantics_request_body(self): + """Test case for post_nested_oneof_to_check_validation_semantics_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_nested_oneof_to_check_validation_semantics_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nested_oneof_to_check_validation_semantics_request_body(body=body) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_nested_oneof_to_check_validation_semantics_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types(self): + """Test case for post_nested_oneof_to_check_validation_semantics_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_nested_oneof_to_check_validation_semantics_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_not_more_complex_schema_request_body(self): + """Test case for post_not_more_complex_schema_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_not_more_complex_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_other_match_passes + # other match + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_not_more_complex_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_mismatch_fails + # mismatch + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "bar", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_not_more_complex_schema_request_body(body=body) + + # test_match_passes + # match + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_not_more_complex_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_not_more_complex_schema_response_body_for_content_types(self): + """Test case for post_not_more_complex_schema_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_not_more_complex_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_other_match_passes + # other match + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_not_more_complex_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_fails + # mismatch + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_not_more_complex_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_match_passes + # match + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_not_more_complex_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_not_request_body(self): + """Test case for post_not_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_not_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_allowed_passes + # allowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_not_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNotRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_disallowed_fails + # disallowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_not_request_body(body=body) + + + + def test_post_not_response_body_for_content_types(self): + """Test case for post_not_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_not_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_allowed_passes + # allowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_not_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_disallowed_fails + # disallowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_not_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_nul_characters_in_strings_request_body(self): + """Test case for post_nul_characters_in_strings_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_nul_characters_in_strings_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_match_string_with_nul_passes + # match string with nul + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "hello\x00there" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_nul_characters_in_strings_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNulCharactersInStringsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_do_not_match_string_lacking_nul_fails + # do not match string lacking nul + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "hellothere" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_nul_characters_in_strings_request_body(body=body) + + + + def test_post_nul_characters_in_strings_response_body_for_content_types(self): + """Test case for post_nul_characters_in_strings_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_nul_characters_in_strings_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_match_string_with_nul_passes + # match string with nul + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "hello\x00there" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nul_characters_in_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNulCharactersInStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_do_not_match_string_lacking_nul_fails + # do not match string lacking nul + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "hellothere" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nul_characters_in_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNulCharactersInStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_null_type_matches_only_the_null_object_request_body(self): + """Test case for post_null_type_matches_only_the_null_object_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_null_type_matches_only_the_null_object_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_a_float_is_not_null_fails + # a float is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_an_object_is_not_null_fails + # an object is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_false_is_not_null_fails + # false is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_an_integer_is_not_null_fails + # an integer is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_true_is_not_null_fails + # true is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_zero_is_not_null_fails + # zero is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_an_empty_string_is_not_null_fails + # an empty string is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_null_is_null_passes + # null is null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_null_type_matches_only_the_null_object_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_array_is_not_null_fails + # an array is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + # test_a_string_is_not_null_fails + # a string is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_null_type_matches_only_the_null_object_request_body(body=body) + + + + def test_post_null_type_matches_only_the_null_object_response_body_for_content_types(self): + """Test case for post_null_type_matches_only_the_null_object_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_null_type_matches_only_the_null_object_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_a_float_is_not_null_fails + # a float is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_null_fails + # an object is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_false_is_not_null_fails + # false is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_not_null_fails + # an integer is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_not_null_fails + # true is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_zero_is_not_null_fails + # zero is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_empty_string_is_not_null_fails + # an empty string is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_null_passes + # null is null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_array_is_not_null_fails + # an array is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_null_fails + # a string is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_number_type_matches_numbers_request_body(self): + """Test case for post_number_type_matches_numbers_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_number_type_matches_numbers_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_an_array_is_not_a_number_fails + # an array is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_null_is_not_a_number_fails + # null is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_an_object_is_not_a_number_fails + # an object is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_a_boolean_is_not_a_number_fails + # a boolean is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_a_float_is_a_number_passes + # a float is a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails + # a string is still not a number, even if it looks like one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_a_string_is_not_a_number_fails + # a string is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_number_type_matches_numbers_request_body(body=body) + + # test_an_integer_is_a_number_passes + # an integer is a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes + # a float with zero fractional part is a number (and an integer) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_number_type_matches_numbers_response_body_for_content_types(self): + """Test case for post_number_type_matches_numbers_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_number_type_matches_numbers_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_array_is_not_a_number_fails + # an array is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_a_number_fails + # null is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_a_number_fails + # an object is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_a_number_fails + # a boolean is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_float_is_a_number_passes + # a float is a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails + # a string is still not a number, even if it looks like one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_a_number_fails + # a string is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_a_number_passes + # an integer is a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes + # a float with zero fractional part is a number (and an integer) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_object_properties_validation_request_body(self): + """Test case for post_object_properties_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_object_properties_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_object_properties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_object_properties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_one_property_invalid_is_invalid_fails + # one property invalid is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + { + }, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_properties_validation_request_body(body=body) + + # test_both_properties_present_and_valid_is_valid_passes + # both properties present and valid is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + "baz", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_object_properties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_doesn_t_invalidate_other_properties_passes + # doesn't invalidate other properties + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "quux": + [ + ], + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_object_properties_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_both_properties_invalid_is_invalid_fails + # both properties invalid is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + [ + ], + "bar": + { + }, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_properties_validation_request_body(body=body) + + + + def test_post_object_properties_validation_response_body_for_content_types(self): + """Test case for post_object_properties_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_object_properties_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_one_property_invalid_is_invalid_fails + # one property invalid is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + { + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_properties_present_and_valid_is_valid_passes + # both properties present and valid is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_doesn_t_invalidate_other_properties_passes + # doesn't invalidate other properties + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "quux": + [ + ], + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_both_properties_invalid_is_invalid_fails + # both properties invalid is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + [ + ], + "bar": + { + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_object_type_matches_objects_request_body(self): + """Test case for post_object_type_matches_objects_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_object_type_matches_objects_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_a_float_is_not_an_object_fails + # a float is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + # test_null_is_not_an_object_fails + # null is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + # test_an_array_is_not_an_object_fails + # an array is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + # test_an_object_is_an_object_passes + # an object is an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_object_type_matches_objects_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postObjectTypeMatchesObjectsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_string_is_not_an_object_fails + # a string is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + # test_an_integer_is_not_an_object_fails + # an integer is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + # test_a_boolean_is_not_an_object_fails + # a boolean is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_object_type_matches_objects_request_body(body=body) + + + + def test_post_object_type_matches_objects_response_body_for_content_types(self): + """Test case for post_object_type_matches_objects_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_object_type_matches_objects_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_a_float_is_not_an_object_fails + # a float is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_an_object_fails + # null is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_an_object_fails + # an array is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_an_object_passes + # an object is an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_string_is_not_an_object_fails + # a string is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_not_an_object_fails + # an integer is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_an_object_fails + # a boolean is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_oneof_complex_types_request_body(self): + """Test case for post_oneof_complex_types_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_oneof_complex_types_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_first_oneof_valid_complex_passes + # first oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_complex_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_neither_oneof_valid_complex_fails + # neither oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 2, + "bar": + "quux", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_complex_types_request_body(body=body) + + # test_both_oneof_valid_complex_fails + # both oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_complex_types_request_body(body=body) + + # test_second_oneof_valid_complex_passes + # second oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_complex_types_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_oneof_complex_types_response_body_for_content_types(self): + """Test case for post_oneof_complex_types_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_oneof_complex_types_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_first_oneof_valid_complex_passes + # first oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_oneof_valid_complex_fails + # neither oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 2, + "bar": + "quux", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_oneof_valid_complex_fails + # both oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_second_oneof_valid_complex_passes + # second oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_oneof_request_body(self): + """Test case for post_oneof_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_oneof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_second_oneof_valid_passes + # second oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.5 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_both_oneof_valid_fails + # both oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_request_body(body=body) + + # test_first_oneof_valid_passes + # first oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_neither_oneof_valid_fails + # neither oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.5 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_request_body(body=body) + + + + def test_post_oneof_response_body_for_content_types(self): + """Test case for post_oneof_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_oneof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_second_oneof_valid_passes + # second oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_both_oneof_valid_fails + # both oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_first_oneof_valid_passes + # first oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_oneof_valid_fails + # neither oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_oneof_with_base_schema_request_body(self): + """Test case for post_oneof_with_base_schema_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_oneof_with_base_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_both_oneof_valid_fails + # both oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_with_base_schema_request_body(body=body) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_with_base_schema_request_body(body=body) + + # test_one_oneof_valid_passes + # one oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_with_base_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofWithBaseSchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_oneof_with_base_schema_response_body_for_content_types(self): + """Test case for post_oneof_with_base_schema_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_oneof_with_base_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_both_oneof_valid_fails + # both oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_oneof_valid_passes + # one oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_oneof_with_empty_schema_request_body(self): + """Test case for post_oneof_with_empty_schema_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_oneof_with_empty_schema_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_both_valid_invalid_fails + # both valid - invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_oneof_with_empty_schema_request_body(body=body) + + # test_one_valid_valid_passes + # one valid - valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_oneof_with_empty_schema_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postOneofWithEmptySchemaRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_oneof_with_empty_schema_response_body_for_content_types(self): + """Test case for post_oneof_with_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_oneof_with_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_both_valid_invalid_fails + # both valid - invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_with_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_valid_valid_passes + # one valid - valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_with_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_pattern_is_not_anchored_request_body(self): + """Test case for post_pattern_is_not_anchored_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_pattern_is_not_anchored_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_matches_a_substring_passes + # matches a substring + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "xxaayy" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_is_not_anchored_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternIsNotAnchoredRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_pattern_is_not_anchored_response_body_for_content_types(self): + """Test case for post_pattern_is_not_anchored_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_pattern_is_not_anchored_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_matches_a_substring_passes + # matches a substring + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "xxaayy" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_is_not_anchored_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_pattern_validation_request_body(self): + """Test case for post_pattern_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_pattern_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_objects_passes + # ignores objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_null_passes + # ignores null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_floats_passes + # ignores floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_non_matching_pattern_is_invalid_fails + # a non-matching pattern is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "abc" + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_pattern_validation_request_body(body=body) + + # test_ignores_booleans_passes + # ignores booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_matching_pattern_is_valid_passes + # a matching pattern is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "aaa" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_integers_passes + # ignores integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_pattern_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPatternValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_pattern_validation_response_body_for_content_types(self): + """Test case for post_pattern_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_pattern_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_objects_passes + # ignores objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_null_passes + # ignores null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_floats_passes + # ignores floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_non_matching_pattern_is_invalid_fails + # a non-matching pattern is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "abc" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_booleans_passes + # ignores booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_matching_pattern_is_valid_passes + # a matching pattern is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "aaa" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_integers_passes + # ignores integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_properties_with_escaped_characters_request_body(self): + """Test case for post_properties_with_escaped_characters_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_properties_with_escaped_characters_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_object_with_all_numbers_is_valid_passes + # object with all numbers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo\nbar": + 1, + "foo\"bar": + 1, + "foo\\bar": + 1, + "foo\rbar": + 1, + "foo\tbar": + 1, + "foo\fbar": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_properties_with_escaped_characters_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPropertiesWithEscapedCharactersRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_object_with_strings_is_invalid_fails + # object with strings is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo\nbar": + "1", + "foo\"bar": + "1", + "foo\\bar": + "1", + "foo\rbar": + "1", + "foo\tbar": + "1", + "foo\fbar": + "1", + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_properties_with_escaped_characters_request_body(body=body) + + + + def test_post_properties_with_escaped_characters_response_body_for_content_types(self): + """Test case for post_properties_with_escaped_characters_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_properties_with_escaped_characters_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_object_with_all_numbers_is_valid_passes + # object with all numbers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo\nbar": + 1, + "foo\"bar": + 1, + "foo\\bar": + 1, + "foo\rbar": + 1, + "foo\tbar": + 1, + "foo\fbar": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_properties_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_object_with_strings_is_invalid_fails + # object with strings is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo\nbar": + "1", + "foo\"bar": + "1", + "foo\\bar": + "1", + "foo\rbar": + "1", + "foo\tbar": + "1", + "foo\fbar": + "1", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_properties_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_property_named_ref_that_is_not_a_reference_request_body(self): + """Test case for post_property_named_ref_that_is_not_a_reference_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_property_named_ref_that_is_not_a_reference_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_property_named_ref_that_is_not_a_reference_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_property_named_ref_that_is_not_a_reference_request_body(body=body) + + + + def test_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types(self): + """Test case for post_property_named_ref_that_is_not_a_reference_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_property_named_ref_that_is_not_a_reference_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_additionalproperties_request_body(self): + """Test case for post_ref_in_additionalproperties_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_additionalproperties_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "someProp": + { + "$ref": + "a", + }, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_additionalproperties_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInAdditionalpropertiesRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "someProp": + { + "$ref": + 2, + }, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_additionalproperties_request_body(body=body) + + + + def test_post_ref_in_additionalproperties_response_body_for_content_types(self): + """Test case for post_ref_in_additionalproperties_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_additionalproperties_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "someProp": + { + "$ref": + "a", + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_additionalproperties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "someProp": + { + "$ref": + 2, + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_additionalproperties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_allof_request_body(self): + """Test case for post_ref_in_allof_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_allof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_allof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInAllofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_allof_request_body(body=body) + + + + def test_post_ref_in_allof_response_body_for_content_types(self): + """Test case for post_ref_in_allof_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_allof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAllofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_anyof_request_body(self): + """Test case for post_ref_in_anyof_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_anyof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_anyof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInAnyofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_anyof_request_body(body=body) + + + + def test_post_ref_in_anyof_response_body_for_content_types(self): + """Test case for post_ref_in_anyof_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_anyof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAnyofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_items_request_body(self): + """Test case for post_ref_in_items_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_items_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "$ref": + "a", + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_items_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInItemsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "$ref": + 2, + }, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_items_request_body(body=body) + + + + def test_post_ref_in_items_response_body_for_content_types(self): + """Test case for post_ref_in_items_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_items_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "$ref": + "a", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInItemsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "$ref": + 2, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInItemsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_oneof_request_body(self): + """Test case for post_ref_in_oneof_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_oneof_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_oneof_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInOneofRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_oneof_request_body(body=body) + + + + def test_post_ref_in_oneof_response_body_for_content_types(self): + """Test case for post_ref_in_oneof_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_oneof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_property_request_body(self): + """Test case for post_ref_in_property_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_property_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "a": + { + "$ref": + "a", + }, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_ref_in_property_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRefInPropertyRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "a": + { + "$ref": + 2, + }, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_ref_in_property_request_body(body=body) + + + + def test_post_ref_in_property_response_body_for_content_types(self): + """Test case for post_ref_in_property_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_ref_in_property_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "a": + { + "$ref": + "a", + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInPropertyResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "a": + { + "$ref": + 2, + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInPropertyResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_required_default_validation_request_body(self): + """Test case for post_required_default_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_required_default_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_not_required_by_default_passes + # not required by default + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_default_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredDefaultValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_required_default_validation_response_body_for_content_types(self): + """Test case for post_required_default_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_required_default_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_not_required_by_default_passes + # not required by default + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_default_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_required_validation_request_body(self): + """Test case for post_required_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_required_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_present_required_property_is_valid_passes + # present required property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_present_required_property_is_invalid_fails + # non-present required property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 1, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_required_validation_request_body(body=body) + + + + def test_post_required_validation_response_body_for_content_types(self): + """Test case for post_required_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_required_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_present_required_property_is_valid_passes + # present required property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_present_required_property_is_invalid_fails + # non-present required property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_required_with_empty_array_request_body(self): + """Test case for post_required_with_empty_array_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_required_with_empty_array_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_property_not_required_passes + # property not required + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_required_with_empty_array_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postRequiredWithEmptyArrayRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_required_with_empty_array_response_body_for_content_types(self): + """Test case for post_required_with_empty_array_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_required_with_empty_array_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_not_required_passes + # property not required + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_with_empty_array_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_simple_enum_validation_request_body(self): + """Test case for post_simple_enum_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_simple_enum_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_something_else_is_invalid_fails + # something else is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 4 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_simple_enum_validation_request_body(body=body) + + # test_one_of_the_enum_is_valid_passes + # one of the enum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_simple_enum_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postSimpleEnumValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_simple_enum_validation_response_body_for_content_types(self): + """Test case for post_simple_enum_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_simple_enum_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_something_else_is_invalid_fails + # something else is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 4 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_simple_enum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postSimpleEnumValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_of_the_enum_is_valid_passes + # one of the enum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_simple_enum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postSimpleEnumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_string_type_matches_strings_request_body(self): + """Test case for post_string_type_matches_strings_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_string_type_matches_strings_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_1_is_not_a_string_fails + # 1 is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes + # a string is still a string, even if it looks like a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_empty_string_is_still_a_string_passes + # an empty string is still a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_float_is_not_a_string_fails + # a float is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_an_object_is_not_a_string_fails + # an object is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_an_array_is_not_a_string_fails + # an array is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_a_boolean_is_not_a_string_fails + # a boolean is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_null_is_not_a_string_fails + # null is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_string_type_matches_strings_request_body(body=body) + + # test_a_string_is_a_string_passes + # a string is a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_string_type_matches_strings_response_body_for_content_types(self): + """Test case for post_string_type_matches_strings_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_string_type_matches_strings_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_1_is_not_a_string_fails + # 1 is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes + # a string is still a string, even if it looks like a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_empty_string_is_still_a_string_passes + # an empty string is still a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_float_is_not_a_string_fails + # a float is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_a_string_fails + # an object is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_a_string_fails + # an array is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_a_string_fails + # a boolean is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_a_string_fails + # null is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_a_string_passes + # a string is a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(self): + """Test case for post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_missing_properties_are_not_filled_in_with_the_default_passes + # missing properties are not filled in with the default + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_explicit_property_value_is_checked_against_maximum_passing_passes + # an explicit property value is checked against maximum (passing) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "alpha": + 1, + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_an_explicit_property_value_is_checked_against_maximum_failing_fails + # an explicit property value is checked against maximum (failing) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "alpha": + 5, + } + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(body=body) + + + + def test_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types(self): + """Test case for post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_missing_properties_are_not_filled_in_with_the_default_passes + # missing properties are not filled in with the default + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_explicit_property_value_is_checked_against_maximum_passing_passes + # an explicit property value is checked against maximum (passing) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "alpha": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_explicit_property_value_is_checked_against_maximum_failing_fails + # an explicit property value is checked against maximum (failing) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "alpha": + 5, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_uniqueitems_false_validation_request_body(self): + """Test case for post_uniqueitems_false_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_uniqueitems_false_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_non_unique_array_of_integers_is_valid_passes + # non-unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_objects_is_valid_passes + # unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "baz", + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_nested_objects_is_valid_passes + # non-unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_objects_is_valid_passes + # non-unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "bar", + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_1_and_true_are_unique_passes + # 1 and true are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_integers_is_valid_passes + # unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_arrays_is_valid_passes + # non-unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "foo", + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_numbers_are_unique_if_mathematically_unequal_passes + # numbers are unique if mathematically unequal + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1.0, + 1.0, + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_false_is_not_equal_to_zero_passes + # false is not equal to zero + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_nested_objects_is_valid_passes + # unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + False, + }, + }, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_0_and_false_are_unique_passes + # 0 and false are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_arrays_is_valid_passes + # unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_true_is_not_equal_to_one_passes + # true is not equal to one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_heterogeneous_types_are_valid_passes + # non-unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + { + }, + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_heterogeneous_types_are_valid_passes + # unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + 1, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_uniqueitems_false_validation_response_body_for_content_types(self): + """Test case for post_uniqueitems_false_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_uniqueitems_false_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_non_unique_array_of_integers_is_valid_passes + # non-unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_objects_is_valid_passes + # unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "baz", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_nested_objects_is_valid_passes + # non-unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_objects_is_valid_passes + # non-unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "bar", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_1_and_true_are_unique_passes + # 1 and true are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_integers_is_valid_passes + # unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_arrays_is_valid_passes + # non-unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_numbers_are_unique_if_mathematically_unequal_passes + # numbers are unique if mathematically unequal + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1.0, + 1.0, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_false_is_not_equal_to_zero_passes + # false is not equal to zero + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_nested_objects_is_valid_passes + # unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + False, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_0_and_false_are_unique_passes + # 0 and false are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_arrays_is_valid_passes + # unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_true_is_not_equal_to_one_passes + # true is not equal to one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_heterogeneous_types_are_valid_passes + # non-unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + { + }, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_heterogeneous_types_are_valid_passes + # unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_uniqueitems_validation_request_body(self): + """Test case for post_uniqueitems_validation_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_uniqueitems_validation_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_unique_array_of_objects_is_valid_passes + # unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "baz", + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_true_and_a1_are_unique_passes + # {"a": true} and {"a": 1} are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + True, + }, + { + "a": + 1, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_heterogeneous_types_are_invalid_fails + # non-unique heterogeneous types are invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + { + }, + 1, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_nested0_and_false_are_unique_passes + # nested [0] and [false] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 0, + ], + "foo", + ], + [ + [ + False, + ], + "foo", + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_a_false_and_a0_are_unique_passes + # {"a": false} and {"a": 0} are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + False, + }, + { + "a": + 0, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_numbers_are_unique_if_mathematically_unequal_fails + # numbers are unique if mathematically unequal + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1.0, + 1.0, + 1, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_false_is_not_equal_to_zero_passes + # false is not equal to zero + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_0_and_false_are_unique_passes + # [0] and [false] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + 0, + ], + [ + False, + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_arrays_is_valid_passes + # unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_nested_objects_is_invalid_fails + # non-unique array of nested objects is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_non_unique_array_of_more_than_two_integers_is_invalid_fails + # non-unique array of more than two integers is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 1, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_true_is_not_equal_to_one_passes + # true is not equal to one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_objects_are_non_unique_despite_key_order_fails + # objects are non-unique despite key order + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + 1, + "b": + 2, + }, + { + "b": + 2, + "a": + 1, + }, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_unique_array_of_strings_is_valid_passes + # unique array of strings is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + "foo", + "bar", + "baz", + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_1_and_true_are_unique_passes + # [1] and [true] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + 1, + ], + [ + True, + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_different_objects_are_unique_passes + # different objects are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + 1, + "b": + 2, + }, + { + "a": + 2, + "b": + 1, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_array_of_integers_is_valid_passes + # unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_more_than_two_arrays_is_invalid_fails + # non-unique array of more than two arrays is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + [ + "foo", + ], + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_non_unique_array_of_objects_is_invalid_fails + # non-unique array of objects is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "bar", + }, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_unique_array_of_nested_objects_is_valid_passes + # unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + False, + }, + }, + }, + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_arrays_is_invalid_fails + # non-unique array of arrays is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "foo", + ], + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_non_unique_array_of_strings_is_invalid_fails + # non-unique array of strings is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + "foo", + "bar", + "foo", + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + # test_nested1_and_true_are_unique_passes + # nested [1] and [true] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 1, + ], + "foo", + ], + [ + [ + True, + ], + "foo", + ], + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_unique_heterogeneous_types_are_valid_passes + # unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + 1, + "{}", + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_non_unique_array_of_integers_is_invalid_fails + # non-unique array of integers is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 1, + ] + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + self.api.post_uniqueitems_validation_request_body(body=body) + + + + def test_post_uniqueitems_validation_response_body_for_content_types(self): + """Test case for post_uniqueitems_validation_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_uniqueitems_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_unique_array_of_objects_is_valid_passes + # unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "baz", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_true_and_a1_are_unique_passes + # {"a": true} and {"a": 1} are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + True, + }, + { + "a": + 1, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_heterogeneous_types_are_invalid_fails + # non-unique heterogeneous types are invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + { + }, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_nested0_and_false_are_unique_passes + # nested [0] and [false] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 0, + ], + "foo", + ], + [ + [ + False, + ], + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_false_and_a0_are_unique_passes + # {"a": false} and {"a": 0} are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + False, + }, + { + "a": + 0, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_numbers_are_unique_if_mathematically_unequal_fails + # numbers are unique if mathematically unequal + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1.0, + 1.0, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_false_is_not_equal_to_zero_passes + # false is not equal to zero + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_0_and_false_are_unique_passes + # [0] and [false] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + 0, + ], + [ + False, + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_arrays_is_valid_passes + # unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_nested_objects_is_invalid_fails + # non-unique array of nested objects is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_non_unique_array_of_more_than_two_integers_is_invalid_fails + # non-unique array of more than two integers is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_not_equal_to_one_passes + # true is not equal to one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_objects_are_non_unique_despite_key_order_fails + # objects are non-unique despite key order + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + 1, + "b": + 2, + }, + { + "b": + 2, + "a": + 1, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_unique_array_of_strings_is_valid_passes + # unique array of strings is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + "foo", + "bar", + "baz", + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_1_and_true_are_unique_passes + # [1] and [true] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + 1, + ], + [ + True, + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_different_objects_are_unique_passes + # different objects are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + 1, + "b": + 2, + }, + { + "a": + 2, + "b": + 1, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_integers_is_valid_passes + # unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_more_than_two_arrays_is_invalid_fails + # non-unique array of more than two arrays is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + [ + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_non_unique_array_of_objects_is_invalid_fails + # non-unique array of objects is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "bar", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_unique_array_of_nested_objects_is_valid_passes + # unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + False, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_arrays_is_invalid_fails + # non-unique array of arrays is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_non_unique_array_of_strings_is_invalid_fails + # non-unique array of strings is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + "foo", + "bar", + "foo", + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_nested1_and_true_are_unique_passes + # nested [1] and [true] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 1, + ], + "foo", + ], + [ + [ + True, + ], + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_heterogeneous_types_are_valid_passes + # unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + 1, + "{}", + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_integers_is_invalid_fails + # non-unique array of integers is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_uri_format_request_body(self): + """Test case for post_uri_format_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_uri_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_uri_format_response_body_for_content_types(self): + """Test case for post_uri_format_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_uri_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_uri_reference_format_request_body(self): + """Test case for post_uri_reference_format_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_uri_reference_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_reference_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_uri_reference_format_response_body_for_content_types(self): + """Test case for post_uri_reference_format_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_uri_reference_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_uri_template_format_request_body(self): + """Test case for post_uri_template_format_request_body + + """ + from unit_test_api.api.path_post_api_endpoints import post_uri_template_format_request_body as endpoint_module + response_status = 200 + response_body = '' + content_type = 'application/json' + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(response_body), + status=response_status + ) + api_response = self.api.post_uri_template_format_request_body( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', + method='POST', + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + + + + def test_post_uri_template_format_response_body_for_content_types(self): + """Test case for post_uri_template_format_response_body_for_content_types + + """ + from unit_test_api.api.path_post_api_endpoints import post_uri_template_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_request_body_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_request_body_api.py deleted file mode 100644 index ab14cbc10fe..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_request_body_api.py +++ /dev/null @@ -1,10585 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.api.request_body_api import RequestBodyApi # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from . import ApiTestMixin - - -class TestRequestBodyApi(ApiTestMixin, unittest.TestCase): - """RequestBodyApi unit test stubs""" - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = RequestBodyApi(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - def test_post_additionalproperties_allows_a_schema_which_should_validate_request_body(self): - """Test case for post_additionalproperties_allows_a_schema_which_should_validate_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_additionalproperties_allows_a_schema_which_should_validate_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_no_additional_properties_is_valid_passes - # no additional properties is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_additional_invalid_property_is_invalid_fails - # an additional invalid property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - 12, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - 2, - "quux": - 12, - }, - _configuration=self._configuration - ) - self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body(body=body) - - # test_an_additional_valid_property_is_valid_passes - # an additional valid property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - True, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_additionalproperties_are_allowed_by_default_request_body(self): - """Test case for post_additionalproperties_are_allowed_by_default_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_additionalproperties_are_allowed_by_default_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_additional_properties_are_allowed_passes - # additional properties are allowed - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - True, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_additionalproperties_are_allowed_by_default_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_additionalproperties_can_exist_by_itself_request_body(self): - """Test case for post_additionalproperties_can_exist_by_itself_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_additionalproperties_can_exist_by_itself_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_an_additional_invalid_property_is_invalid_fails - # an additional invalid property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - }, - _configuration=self._configuration - ) - self.api.post_additionalproperties_can_exist_by_itself_request_body(body=body) - - # test_an_additional_valid_property_is_valid_passes - # an additional valid property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - True, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_additionalproperties_can_exist_by_itself_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_additionalproperties_should_not_look_in_applicators_request_body(self): - """Test case for post_additionalproperties_should_not_look_in_applicators_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_additionalproperties_should_not_look_in_applicators_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_properties_defined_in_allof_are_not_examined_fails - # properties defined in allOf are not examined - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - True, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - True, - }, - _configuration=self._configuration - ) - self.api.post_additionalproperties_should_not_look_in_applicators_request_body(body=body) - - - - def test_post_allof_combined_with_anyof_oneof_request_body(self): - """Test case for post_allof_combined_with_anyof_oneof_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_allof_combined_with_anyof_oneof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_allof_true_anyof_false_oneof_false_fails - # allOf: true, anyOf: false, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 2 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 2, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_false_anyof_false_oneof_true_fails - # allOf: false, anyOf: false, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 5, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_false_anyof_true_oneof_true_fails - # allOf: false, anyOf: true, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 15 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 15, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_true_anyof_true_oneof_false_fails - # allOf: true, anyOf: true, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 6 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 6, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_true_anyof_true_oneof_true_passes - # allOf: true, anyOf: true, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 30 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_combined_with_anyof_oneof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofCombinedWithAnyofOneofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_allof_true_anyof_false_oneof_true_fails - # allOf: true, anyOf: false, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 10 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 10, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_false_anyof_true_oneof_false_fails - # allOf: false, anyOf: true, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - # test_allof_false_anyof_false_oneof_false_fails - # allOf: false, anyOf: false, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_allof_combined_with_anyof_oneof_request_body(body=body) - - - - def test_post_allof_request_body(self): - """Test case for post_allof_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_allof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_allof_passes - # allOf - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_mismatch_first_fails - # mismatch first - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 2, - }, - _configuration=self._configuration - ) - self.api.post_allof_request_body(body=body) - - # test_mismatch_second_fails - # mismatch second - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "baz", - }, - _configuration=self._configuration - ) - self.api.post_allof_request_body(body=body) - - # test_wrong_type_fails - # wrong type - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - "bar": - "quux", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "baz", - "bar": - "quux", - }, - _configuration=self._configuration - ) - self.api.post_allof_request_body(body=body) - - - - def test_post_allof_simple_types_request_body(self): - """Test case for post_allof_simple_types_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_allof_simple_types_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_valid_passes - # valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 25 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_simple_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofSimpleTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_mismatch_one_fails - # mismatch one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 35 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 35, - _configuration=self._configuration - ) - self.api.post_allof_simple_types_request_body(body=body) - - - - def test_post_allof_with_base_schema_request_body(self): - """Test case for post_allof_with_base_schema_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_allof_with_base_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_valid_passes - # valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "quux", - "bar": - 2, - "baz": - None, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_with_base_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithBaseSchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_mismatch_first_allof_fails - # mismatch first allOf - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 2, - "baz": - None, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 2, - "baz": - None, - }, - _configuration=self._configuration - ) - self.api.post_allof_with_base_schema_request_body(body=body) - - # test_mismatch_base_schema_fails - # mismatch base schema - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "quux", - "baz": - None, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "quux", - "baz": - None, - }, - _configuration=self._configuration - ) - self.api.post_allof_with_base_schema_request_body(body=body) - - # test_mismatch_both_fails - # mismatch both - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 2, - }, - _configuration=self._configuration - ) - self.api.post_allof_with_base_schema_request_body(body=body) - - # test_mismatch_second_allof_fails - # mismatch second allOf - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "quux", - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "quux", - "bar": - 2, - }, - _configuration=self._configuration - ) - self.api.post_allof_with_base_schema_request_body(body=body) - - - - def test_post_allof_with_one_empty_schema_request_body(self): - """Test case for post_allof_with_one_empty_schema_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_allof_with_one_empty_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_any_data_is_valid_passes - # any data is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_with_one_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithOneEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_allof_with_the_first_empty_schema_request_body(self): - """Test case for post_allof_with_the_first_empty_schema_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_allof_with_the_first_empty_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_string_is_invalid_fails - # string is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_allof_with_the_first_empty_schema_request_body(body=body) - - # test_number_is_valid_passes - # number is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_with_the_first_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithTheFirstEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_allof_with_the_last_empty_schema_request_body(self): - """Test case for post_allof_with_the_last_empty_schema_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_allof_with_the_last_empty_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_string_is_invalid_fails - # string is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_allof_with_the_last_empty_schema_request_body(body=body) - - # test_number_is_valid_passes - # number is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_with_the_last_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithTheLastEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_allof_with_two_empty_schemas_request_body(self): - """Test case for post_allof_with_two_empty_schemas_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_allof_with_two_empty_schemas_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_any_data_is_valid_passes - # any data is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_allof_with_two_empty_schemas_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithTwoEmptySchemasRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_anyof_complex_types_request_body(self): - """Test case for post_anyof_complex_types_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_anyof_complex_types_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_second_anyof_valid_complex_passes - # second anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_complex_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_neither_anyof_valid_complex_fails - # neither anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 2, - "bar": - "quux", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 2, - "bar": - "quux", - }, - _configuration=self._configuration - ) - self.api.post_anyof_complex_types_request_body(body=body) - - # test_both_anyof_valid_complex_passes - # both anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_complex_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_first_anyof_valid_complex_passes - # first anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_complex_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_anyof_request_body(self): - """Test case for post_anyof_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_anyof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_second_anyof_valid_passes - # second anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 2.5 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_neither_anyof_valid_fails - # neither anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.5, - _configuration=self._configuration - ) - self.api.post_anyof_request_body(body=body) - - # test_both_anyof_valid_passes - # both anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_first_anyof_valid_passes - # first anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_anyof_with_base_schema_request_body(self): - """Test case for post_anyof_with_base_schema_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_anyof_with_base_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_one_anyof_valid_passes - # one anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foobar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_with_base_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofWithBaseSchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_both_anyof_invalid_fails - # both anyOf invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_anyof_with_base_schema_request_body(body=body) - - # test_mismatch_base_schema_fails - # mismatch base schema - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, - _configuration=self._configuration - ) - self.api.post_anyof_with_base_schema_request_body(body=body) - - - - def test_post_anyof_with_one_empty_schema_request_body(self): - """Test case for post_anyof_with_one_empty_schema_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_anyof_with_one_empty_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_string_is_valid_passes - # string is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_with_one_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_number_is_valid_passes - # number is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_anyof_with_one_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_array_type_matches_arrays_request_body(self): - """Test case for post_array_type_matches_arrays_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_array_type_matches_arrays_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_a_float_is_not_an_array_fails - # a float is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - # test_a_boolean_is_not_an_array_fails - # a boolean is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - # test_null_is_not_an_array_fails - # null is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - # test_an_object_is_not_an_array_fails - # an object is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - # test_a_string_is_not_an_array_fails - # a string is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - # test_an_array_is_an_array_passes - # an array is an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_array_type_matches_arrays_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postArrayTypeMatchesArraysRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_integer_is_not_an_array_fails - # an integer is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_array_type_matches_arrays_request_body(body=body) - - - - def test_post_boolean_type_matches_booleans_request_body(self): - """Test case for post_boolean_type_matches_booleans_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_boolean_type_matches_booleans_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_an_empty_string_is_not_a_boolean_fails - # an empty string is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "", - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_a_float_is_not_a_boolean_fails - # a float is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_null_is_not_a_boolean_fails - # null is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_zero_is_not_a_boolean_fails - # zero is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0, - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_an_array_is_not_a_boolean_fails - # an array is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_a_string_is_not_a_boolean_fails - # a string is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_false_is_a_boolean_passes - # false is a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_boolean_type_matches_booleans_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_integer_is_not_a_boolean_fails - # an integer is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - # test_true_is_a_boolean_passes - # true is a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_boolean_type_matches_booleans_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_object_is_not_a_boolean_fails - # an object is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_boolean_type_matches_booleans_request_body(body=body) - - - - def test_post_by_int_request_body(self): - """Test case for post_by_int_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_by_int_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_int_by_int_fail_fails - # int by int fail - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 7 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 7, - _configuration=self._configuration - ) - self.api.post_by_int_request_body(body=body) - - # test_int_by_int_passes - # int by int - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 10 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_by_int_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByIntRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_non_numbers_passes - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_by_int_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByIntRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_by_number_request_body(self): - """Test case for post_by_number_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_by_number_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_45_is_multiple_of15_passes - # 4.5 is multiple of 1.5 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 4.5 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_by_number_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByNumberRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_35_is_not_multiple_of15_fails - # 35 is not multiple of 1.5 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 35 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 35, - _configuration=self._configuration - ) - self.api.post_by_number_request_body(body=body) - - # test_zero_is_multiple_of_anything_passes - # zero is multiple of anything - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_by_number_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByNumberRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_by_small_number_request_body(self): - """Test case for post_by_small_number_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_by_small_number_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_000751_is_not_multiple_of00001_fails - # 0.00751 is not multiple of 0.0001 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0.00751 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0.00751, - _configuration=self._configuration - ) - self.api.post_by_small_number_request_body(body=body) - - # test_00075_is_multiple_of00001_passes - # 0.0075 is multiple of 0.0001 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0.0075 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_by_small_number_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postBySmallNumberRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_date_time_format_request_body(self): - """Test case for post_date_time_format_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_date_time_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_date_time_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_email_format_request_body(self): - """Test case for post_email_format_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_email_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_email_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_enum_with0_does_not_match_false_request_body(self): - """Test case for post_enum_with0_does_not_match_false_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_enum_with0_does_not_match_false_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_integer_zero_is_valid_passes - # integer zero is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with0_does_not_match_false_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_float_zero_is_valid_passes - # float zero is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with0_does_not_match_false_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_false_is_invalid_fails - # false is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - False, - _configuration=self._configuration - ) - self.api.post_enum_with0_does_not_match_false_request_body(body=body) - - - - def test_post_enum_with1_does_not_match_true_request_body(self): - """Test case for post_enum_with1_does_not_match_true_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_enum_with1_does_not_match_true_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_true_is_invalid_fails - # true is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_enum_with1_does_not_match_true_request_body(body=body) - - # test_integer_one_is_valid_passes - # integer one is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with1_does_not_match_true_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_float_one_is_valid_passes - # float one is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with1_does_not_match_true_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_enum_with_escaped_characters_request_body(self): - """Test case for post_enum_with_escaped_characters_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_enum_with_escaped_characters_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_member2_is_valid_passes - # member 2 is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo\rbar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with_escaped_characters_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_member1_is_valid_passes - # member 1 is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo\nbar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with_escaped_characters_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_another_string_is_invalid_fails - # another string is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "abc" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "abc", - _configuration=self._configuration - ) - self.api.post_enum_with_escaped_characters_request_body(body=body) - - - - def test_post_enum_with_false_does_not_match0_request_body(self): - """Test case for post_enum_with_false_does_not_match0_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_enum_with_false_does_not_match0_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_false_is_valid_passes - # false is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with_false_does_not_match0_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithFalseDoesNotMatch0RequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_float_zero_is_invalid_fails - # float zero is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0.0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0.0, - _configuration=self._configuration - ) - self.api.post_enum_with_false_does_not_match0_request_body(body=body) - - # test_integer_zero_is_invalid_fails - # integer zero is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0, - _configuration=self._configuration - ) - self.api.post_enum_with_false_does_not_match0_request_body(body=body) - - - - def test_post_enum_with_true_does_not_match1_request_body(self): - """Test case for post_enum_with_true_does_not_match1_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_enum_with_true_does_not_match1_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_float_one_is_invalid_fails - # float one is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.0, - _configuration=self._configuration - ) - self.api.post_enum_with_true_does_not_match1_request_body(body=body) - - # test_true_is_valid_passes - # true is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enum_with_true_does_not_match1_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithTrueDoesNotMatch1RequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_integer_one_is_invalid_fails - # integer one is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_enum_with_true_does_not_match1_request_body(body=body) - - - - def test_post_enums_in_properties_request_body(self): - """Test case for post_enums_in_properties_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_enums_in_properties_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_missing_optional_property_is_valid_passes - # missing optional property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - "bar", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enums_in_properties_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_wrong_foo_value_fails - # wrong foo value - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "foot", - "bar": - "bar", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "foot", - "bar": - "bar", - }, - _configuration=self._configuration - ) - self.api.post_enums_in_properties_request_body(body=body) - - # test_both_properties_are_valid_passes - # both properties are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "foo", - "bar": - "bar", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_enums_in_properties_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_wrong_bar_value_fails - # wrong bar value - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "foo", - "bar": - "bart", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "foo", - "bar": - "bart", - }, - _configuration=self._configuration - ) - self.api.post_enums_in_properties_request_body(body=body) - - # test_missing_all_properties_is_invalid_fails - # missing all properties is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_enums_in_properties_request_body(body=body) - - # test_missing_required_property_is_invalid_fails - # missing required property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "foo", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "foo", - }, - _configuration=self._configuration - ) - self.api.post_enums_in_properties_request_body(body=body) - - - - def test_post_forbidden_property_request_body(self): - """Test case for post_forbidden_property_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_forbidden_property_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_present_fails - # property present - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - 2, - }, - _configuration=self._configuration - ) - self.api.post_forbidden_property_request_body(body=body) - - # test_property_absent_passes - # property absent - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 1, - "baz": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_forbidden_property_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postForbiddenPropertyRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_hostname_format_request_body(self): - """Test case for post_hostname_format_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_hostname_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_hostname_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_integer_type_matches_integers_request_body(self): - """Test case for post_integer_type_matches_integers_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_integer_type_matches_integers_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_an_object_is_not_an_integer_fails - # an object is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_a_string_is_not_an_integer_fails - # a string is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_null_is_not_an_integer_fails - # null is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_a_float_with_zero_fractional_part_is_an_integer_passes - # a float with zero fractional part is an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_integer_type_matches_integers_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_float_is_not_an_integer_fails - # a float is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_a_boolean_is_not_an_integer_fails - # a boolean is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_an_integer_is_an_integer_passes - # an integer is an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_integer_type_matches_integers_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails - # a string is still not an integer, even if it looks like one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "1" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "1", - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - # test_an_array_is_not_an_integer_fails - # an array is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_integer_type_matches_integers_request_body(body=body) - - - - def test_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(self): - """Test case for post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails - # always invalid, but naive implementations may raise an overflow error - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0E308 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.0E308, - _configuration=self._configuration - ) - self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body=body) - - - - def test_post_invalid_string_value_for_default_request_body(self): - """Test case for post_invalid_string_value_for_default_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_invalid_string_value_for_default_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_valid_when_property_is_specified_passes - # valid when property is specified - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - "good", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_invalid_string_value_for_default_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_still_valid_when_the_invalid_default_is_used_passes - # still valid when the invalid default is used - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_invalid_string_value_for_default_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_ipv4_format_request_body(self): - """Test case for post_ipv4_format_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_ipv4_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv4_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_ipv6_format_request_body(self): - """Test case for post_ipv6_format_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_ipv6_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ipv6_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_json_pointer_format_request_body(self): - """Test case for post_json_pointer_format_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_json_pointer_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_json_pointer_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_maximum_validation_request_body(self): - """Test case for post_maximum_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_maximum_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_below_the_maximum_is_valid_passes - # below the maximum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 2.6 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_boundary_point_is_valid_passes - # boundary point is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_above_the_maximum_is_invalid_fails - # above the maximum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3.5, - _configuration=self._configuration - ) - self.api.post_maximum_validation_request_body(body=body) - - # test_ignores_non_numbers_passes - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "x" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_maximum_validation_with_unsigned_integer_request_body(self): - """Test case for post_maximum_validation_with_unsigned_integer_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_maximum_validation_with_unsigned_integer_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_below_the_maximum_is_invalid_passes - # below the maximum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 299.97 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_above_the_maximum_is_invalid_fails - # above the maximum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 300.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 300.5, - _configuration=self._configuration - ) - self.api.post_maximum_validation_with_unsigned_integer_request_body(body=body) - - # test_boundary_point_integer_is_valid_passes - # boundary point integer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 300 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_boundary_point_float_is_valid_passes - # boundary point float is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 300.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_maxitems_validation_request_body(self): - """Test case for post_maxitems_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_maxitems_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_too_long_is_invalid_fails - # too long is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - 3, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1, - 2, - 3, - ], - _configuration=self._configuration - ) - self.api.post_maxitems_validation_request_body(body=body) - - # test_ignores_non_arrays_passes - # ignores non-arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foobar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_shorter_is_valid_passes - # shorter is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_maxlength_validation_request_body(self): - """Test case for post_maxlength_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_maxlength_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_too_long_is_invalid_fails - # too long is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_maxlength_validation_request_body(body=body) - - # test_ignores_non_strings_passes - # ignores non-strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 100 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_shorter_is_valid_passes - # shorter is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "f" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_two_supplementary_unicode_code_points_is_long_enough_passes - # two supplementary Unicode code points is long enough - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "💩💩" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "fo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_maxproperties0_means_the_object_is_empty_request_body(self): - """Test case for post_maxproperties0_means_the_object_is_empty_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_maxproperties0_means_the_object_is_empty_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_no_properties_is_valid_passes - # no properties is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties0_means_the_object_is_empty_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_one_property_is_invalid_fails - # one property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - }, - _configuration=self._configuration - ) - self.api.post_maxproperties0_means_the_object_is_empty_request_body(body=body) - - - - def test_post_maxproperties_validation_request_body(self): - """Test case for post_maxproperties_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_maxproperties_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_too_long_is_invalid_fails - # too long is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - "baz": - 3, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - 2, - "baz": - 3, - }, - _configuration=self._configuration - ) - self.api.post_maxproperties_validation_request_body(body=body) - - # test_ignores_arrays_passes - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - 3, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_other_non_objects_passes - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_strings_passes - # ignores strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foobar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_shorter_is_valid_passes - # shorter is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_maxproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_minimum_validation_request_body(self): - """Test case for post_minimum_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_minimum_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_boundary_point_is_valid_passes - # boundary point is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_below_the_minimum_is_invalid_fails - # below the minimum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0.6 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0.6, - _configuration=self._configuration - ) - self.api.post_minimum_validation_request_body(body=body) - - # test_above_the_minimum_is_valid_passes - # above the minimum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 2.6 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_non_numbers_passes - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "x" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_minimum_validation_with_signed_integer_request_body(self): - """Test case for post_minimum_validation_with_signed_integer_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_minimum_validation_with_signed_integer_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_boundary_point_is_valid_passes - # boundary point is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - -2 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_with_signed_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_positive_above_the_minimum_is_valid_passes - # positive above the minimum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_with_signed_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_int_below_the_minimum_is_invalid_fails - # int below the minimum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - -3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - -3, - _configuration=self._configuration - ) - self.api.post_minimum_validation_with_signed_integer_request_body(body=body) - - # test_float_below_the_minimum_is_invalid_fails - # float below the minimum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - -2.0001 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - -2.0001, - _configuration=self._configuration - ) - self.api.post_minimum_validation_with_signed_integer_request_body(body=body) - - # test_boundary_point_with_float_is_valid_passes - # boundary point with float is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - -2.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_with_signed_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_negative_above_the_minimum_is_valid_passes - # negative above the minimum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - -1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_with_signed_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_non_numbers_passes - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "x" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minimum_validation_with_signed_integer_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_minitems_validation_request_body(self): - """Test case for post_minitems_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_minitems_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_too_short_is_invalid_fails - # too short is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_minitems_validation_request_body(body=body) - - # test_ignores_non_arrays_passes - # ignores non-arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_longer_is_valid_passes - # longer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_minlength_validation_request_body(self): - """Test case for post_minlength_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_minlength_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_too_short_is_invalid_fails - # too short is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "f" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "f", - _configuration=self._configuration - ) - self.api.post_minlength_validation_request_body(body=body) - - # test_one_supplementary_unicode_code_point_is_not_long_enough_fails - # one supplementary Unicode code point is not long enough - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "💩" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "💩", - _configuration=self._configuration - ) - self.api.post_minlength_validation_request_body(body=body) - - # test_longer_is_valid_passes - # longer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_non_strings_passes - # ignores non-strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "fo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minlength_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_minproperties_validation_request_body(self): - """Test case for post_minproperties_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_minproperties_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_ignores_arrays_passes - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_other_non_objects_passes - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_too_short_is_invalid_fails - # too short is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_minproperties_validation_request_body(body=body) - - # test_ignores_strings_passes - # ignores strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_longer_is_valid_passes - # longer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_exact_length_is_valid_passes - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_minproperties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_nested_allof_to_check_validation_semantics_request_body(self): - """Test case for post_nested_allof_to_check_validation_semantics_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_nested_allof_to_check_validation_semantics_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_anything_non_null_is_invalid_fails - # anything non-null is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, - _configuration=self._configuration - ) - self.api.post_nested_allof_to_check_validation_semantics_request_body(body=body) - - # test_null_is_valid_passes - # null is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_nested_allof_to_check_validation_semantics_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_nested_anyof_to_check_validation_semantics_request_body(self): - """Test case for post_nested_anyof_to_check_validation_semantics_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_nested_anyof_to_check_validation_semantics_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_anything_non_null_is_invalid_fails - # anything non-null is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, - _configuration=self._configuration - ) - self.api.post_nested_anyof_to_check_validation_semantics_request_body(body=body) - - # test_null_is_valid_passes - # null is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_nested_anyof_to_check_validation_semantics_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_nested_items_request_body(self): - """Test case for post_nested_items_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_nested_items_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_valid_nested_array_passes - # valid nested array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - [ - [ - 1, - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_nested_items_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedItemsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_nested_array_with_invalid_type_fails - # nested array with invalid type - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - [ - [ - "1", - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - [ - [ - "1", - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ], - _configuration=self._configuration - ) - self.api.post_nested_items_request_body(body=body) - - # test_not_deep_enough_fails - # not deep enough - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - [ - 1, - ], - [ - 2, - ], - [ - 3, - ], - ], - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - [ - 1, - ], - [ - 2, - ], - [ - 3, - ], - ], - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - _configuration=self._configuration - ) - self.api.post_nested_items_request_body(body=body) - - - - def test_post_nested_oneof_to_check_validation_semantics_request_body(self): - """Test case for post_nested_oneof_to_check_validation_semantics_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_nested_oneof_to_check_validation_semantics_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_anything_non_null_is_invalid_fails - # anything non-null is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, - _configuration=self._configuration - ) - self.api.post_nested_oneof_to_check_validation_semantics_request_body(body=body) - - # test_null_is_valid_passes - # null is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_nested_oneof_to_check_validation_semantics_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_not_more_complex_schema_request_body(self): - """Test case for post_not_more_complex_schema_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_not_more_complex_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_other_match_passes - # other match - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_not_more_complex_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_mismatch_fails - # mismatch - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "bar", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "bar", - }, - _configuration=self._configuration - ) - self.api.post_not_more_complex_schema_request_body(body=body) - - # test_match_passes - # match - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_not_more_complex_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_not_request_body(self): - """Test case for post_not_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_not_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_allowed_passes - # allowed - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_not_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNotRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_disallowed_fails - # disallowed - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_not_request_body(body=body) - - - - def test_post_nul_characters_in_strings_request_body(self): - """Test case for post_nul_characters_in_strings_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_nul_characters_in_strings_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_match_string_with_nul_passes - # match string with nul - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "hello\x00there" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_nul_characters_in_strings_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNulCharactersInStringsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_do_not_match_string_lacking_nul_fails - # do not match string lacking nul - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "hellothere" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "hellothere", - _configuration=self._configuration - ) - self.api.post_nul_characters_in_strings_request_body(body=body) - - - - def test_post_null_type_matches_only_the_null_object_request_body(self): - """Test case for post_null_type_matches_only_the_null_object_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_null_type_matches_only_the_null_object_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_a_float_is_not_null_fails - # a float is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_an_object_is_not_null_fails - # an object is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_false_is_not_null_fails - # false is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - False, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_an_integer_is_not_null_fails - # an integer is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_true_is_not_null_fails - # true is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_zero_is_not_null_fails - # zero is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 0, - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_an_empty_string_is_not_null_fails - # an empty string is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "", - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_null_is_null_passes - # null is null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_null_type_matches_only_the_null_object_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_array_is_not_null_fails - # an array is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - # test_a_string_is_not_null_fails - # a string is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_null_type_matches_only_the_null_object_request_body(body=body) - - - - def test_post_number_type_matches_numbers_request_body(self): - """Test case for post_number_type_matches_numbers_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_number_type_matches_numbers_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_an_array_is_not_a_number_fails - # an array is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_null_is_not_a_number_fails - # null is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_an_object_is_not_a_number_fails - # an object is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_a_boolean_is_not_a_number_fails - # a boolean is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_a_float_is_a_number_passes - # a float is a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_number_type_matches_numbers_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails - # a string is still not a number, even if it looks like one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "1" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "1", - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_a_string_is_not_a_number_fails - # a string is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_number_type_matches_numbers_request_body(body=body) - - # test_an_integer_is_a_number_passes - # an integer is a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_number_type_matches_numbers_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes - # a float with zero fractional part is a number (and an integer) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_number_type_matches_numbers_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_object_properties_validation_request_body(self): - """Test case for post_object_properties_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_object_properties_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_ignores_arrays_passes - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_object_properties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_other_non_objects_passes - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_object_properties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_one_property_invalid_is_invalid_fails - # one property invalid is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - { - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 1, - "bar": - { - }, - }, - _configuration=self._configuration - ) - self.api.post_object_properties_validation_request_body(body=body) - - # test_both_properties_present_and_valid_is_valid_passes - # both properties present and valid is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - "bar": - "baz", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_object_properties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_doesn_t_invalidate_other_properties_passes - # doesn't invalidate other properties - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "quux": - [ - ], - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_object_properties_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_both_properties_invalid_is_invalid_fails - # both properties invalid is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - [ - ], - "bar": - { - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - [ - ], - "bar": - { - }, - }, - _configuration=self._configuration - ) - self.api.post_object_properties_validation_request_body(body=body) - - - - def test_post_object_type_matches_objects_request_body(self): - """Test case for post_object_type_matches_objects_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_object_type_matches_objects_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_a_float_is_not_an_object_fails - # a float is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - # test_null_is_not_an_object_fails - # null is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - # test_an_array_is_not_an_object_fails - # an array is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - # test_an_object_is_an_object_passes - # an object is an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_object_type_matches_objects_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectTypeMatchesObjectsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_string_is_not_an_object_fails - # a string is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - # test_an_integer_is_not_an_object_fails - # an integer is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - # test_a_boolean_is_not_an_object_fails - # a boolean is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_object_type_matches_objects_request_body(body=body) - - - - def test_post_oneof_complex_types_request_body(self): - """Test case for post_oneof_complex_types_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_oneof_complex_types_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_first_oneof_valid_complex_passes - # first oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 2, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_complex_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_neither_oneof_valid_complex_fails - # neither oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 2, - "bar": - "quux", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - 2, - "bar": - "quux", - }, - _configuration=self._configuration - ) - self.api.post_oneof_complex_types_request_body(body=body) - - # test_both_oneof_valid_complex_fails - # both oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo": - "baz", - "bar": - 2, - }, - _configuration=self._configuration - ) - self.api.post_oneof_complex_types_request_body(body=body) - - # test_second_oneof_valid_complex_passes - # second oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - "baz", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_complex_types_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_oneof_request_body(self): - """Test case for post_oneof_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_oneof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_second_oneof_valid_passes - # second oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 2.5 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_both_oneof_valid_fails - # both oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, - _configuration=self._configuration - ) - self.api.post_oneof_request_body(body=body) - - # test_first_oneof_valid_passes - # first oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_neither_oneof_valid_fails - # neither oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.5, - _configuration=self._configuration - ) - self.api.post_oneof_request_body(body=body) - - - - def test_post_oneof_with_base_schema_request_body(self): - """Test case for post_oneof_with_base_schema_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_oneof_with_base_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_both_oneof_valid_fails - # both oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "foo", - _configuration=self._configuration - ) - self.api.post_oneof_with_base_schema_request_body(body=body) - - # test_mismatch_base_schema_fails - # mismatch base schema - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 3, - _configuration=self._configuration - ) - self.api.post_oneof_with_base_schema_request_body(body=body) - - # test_one_oneof_valid_passes - # one oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foobar" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_with_base_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofWithBaseSchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_oneof_with_empty_schema_request_body(self): - """Test case for post_oneof_with_empty_schema_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_oneof_with_empty_schema_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_both_valid_invalid_fails - # both valid - invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 123, - _configuration=self._configuration - ) - self.api.post_oneof_with_empty_schema_request_body(body=body) - - # test_one_valid_valid_passes - # one valid - valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_oneof_with_empty_schema_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofWithEmptySchemaRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_pattern_is_not_anchored_request_body(self): - """Test case for post_pattern_is_not_anchored_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_pattern_is_not_anchored_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_matches_a_substring_passes - # matches a substring - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "xxaayy" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_is_not_anchored_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternIsNotAnchoredRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_pattern_validation_request_body(self): - """Test case for post_pattern_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_pattern_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_ignores_arrays_passes - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_objects_passes - # ignores objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_null_passes - # ignores null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_floats_passes - # ignores floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.0 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_non_matching_pattern_is_invalid_fails - # a non-matching pattern is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "abc" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - "abc", - _configuration=self._configuration - ) - self.api.post_pattern_validation_request_body(body=body) - - # test_ignores_booleans_passes - # ignores booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_matching_pattern_is_valid_passes - # a matching pattern is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "aaa" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_integers_passes - # ignores integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 123 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_pattern_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_properties_with_escaped_characters_request_body(self): - """Test case for post_properties_with_escaped_characters_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_properties_with_escaped_characters_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_object_with_all_numbers_is_valid_passes - # object with all numbers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo\nbar": - 1, - "foo\"bar": - 1, - "foo\\bar": - 1, - "foo\rbar": - 1, - "foo\tbar": - 1, - "foo\fbar": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_properties_with_escaped_characters_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPropertiesWithEscapedCharactersRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_object_with_strings_is_invalid_fails - # object with strings is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo\nbar": - "1", - "foo\"bar": - "1", - "foo\\bar": - "1", - "foo\rbar": - "1", - "foo\tbar": - "1", - "foo\fbar": - "1", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "foo\nbar": - "1", - "foo\"bar": - "1", - "foo\\bar": - "1", - "foo\rbar": - "1", - "foo\tbar": - "1", - "foo\fbar": - "1", - }, - _configuration=self._configuration - ) - self.api.post_properties_with_escaped_characters_request_body(body=body) - - - - def test_post_property_named_ref_that_is_not_a_reference_request_body(self): - """Test case for post_property_named_ref_that_is_not_a_reference_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_property_named_ref_that_is_not_a_reference_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - "a", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_property_named_ref_that_is_not_a_reference_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - self.api.post_property_named_ref_that_is_not_a_reference_request_body(body=body) - - - - def test_post_ref_in_additionalproperties_request_body(self): - """Test case for post_ref_in_additionalproperties_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_ref_in_additionalproperties_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "someProp": - { - "$ref": - "a", - }, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_additionalproperties_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInAdditionalpropertiesRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "someProp": - { - "$ref": - 2, - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "someProp": - { - "$ref": - 2, - }, - }, - _configuration=self._configuration - ) - self.api.post_ref_in_additionalproperties_request_body(body=body) - - - - def test_post_ref_in_allof_request_body(self): - """Test case for post_ref_in_allof_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_ref_in_allof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - "a", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_allof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInAllofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - self.api.post_ref_in_allof_request_body(body=body) - - - - def test_post_ref_in_anyof_request_body(self): - """Test case for post_ref_in_anyof_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_ref_in_anyof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - "a", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_anyof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInAnyofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - self.api.post_ref_in_anyof_request_body(body=body) - - - - def test_post_ref_in_items_request_body(self): - """Test case for post_ref_in_items_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_ref_in_items_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "$ref": - "a", - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_items_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInItemsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "$ref": - 2, - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "$ref": - 2, - }, - ], - _configuration=self._configuration - ) - self.api.post_ref_in_items_request_body(body=body) - - - - def test_post_ref_in_oneof_request_body(self): - """Test case for post_ref_in_oneof_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_ref_in_oneof_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - "a", - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_oneof_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInOneofRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - self.api.post_ref_in_oneof_request_body(body=body) - - - - def test_post_ref_in_property_request_body(self): - """Test case for post_ref_in_property_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_ref_in_property_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_named_ref_valid_passes - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "a": - { - "$ref": - "a", - }, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_ref_in_property_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInPropertyRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_property_named_ref_invalid_fails - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "a": - { - "$ref": - 2, - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "a": - { - "$ref": - 2, - }, - }, - _configuration=self._configuration - ) - self.api.post_ref_in_property_request_body(body=body) - - - - def test_post_required_default_validation_request_body(self): - """Test case for post_required_default_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_required_default_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_not_required_by_default_passes - # not required by default - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_default_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredDefaultValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_required_validation_request_body(self): - """Test case for post_required_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_required_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_ignores_arrays_passes - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_present_required_property_is_valid_passes - # present required property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "foo": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_other_non_objects_passes - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_ignores_strings_passes - # ignores strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_present_required_property_is_invalid_fails - # non-present required property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "bar": - 1, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "bar": - 1, - }, - _configuration=self._configuration - ) - self.api.post_required_validation_request_body(body=body) - - - - def test_post_required_with_empty_array_request_body(self): - """Test case for post_required_with_empty_array_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_required_with_empty_array_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_property_not_required_passes - # property not required - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_required_with_empty_array_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredWithEmptyArrayRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_simple_enum_validation_request_body(self): - """Test case for post_simple_enum_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_simple_enum_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_something_else_is_invalid_fails - # something else is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 4 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 4, - _configuration=self._configuration - ) - self.api.post_simple_enum_validation_request_body(body=body) - - # test_one_of_the_enum_is_valid_passes - # one of the enum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_simple_enum_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postSimpleEnumValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_string_type_matches_strings_request_body(self): - """Test case for post_string_type_matches_strings_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_string_type_matches_strings_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_1_is_not_a_string_fails - # 1 is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1, - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes - # a string is still a string, even if it looks like a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "1" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_string_type_matches_strings_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_empty_string_is_still_a_string_passes - # an empty string is still a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_string_type_matches_strings_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_float_is_not_a_string_fails - # a float is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - 1.1, - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_an_object_is_not_a_string_fails - # an object is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - }, - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_an_array_is_not_a_string_fails - # an array is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - ], - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_a_boolean_is_not_a_string_fails - # a boolean is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - True, - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_null_is_not_a_string_fails - # null is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - None, - _configuration=self._configuration - ) - self.api.post_string_type_matches_strings_request_body(body=body) - - # test_a_string_is_a_string_passes - # a string is a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - "foo" - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_string_type_matches_strings_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(self): - """Test case for post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_missing_properties_are_not_filled_in_with_the_default_passes - # missing properties are not filled in with the default - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_explicit_property_value_is_checked_against_maximum_passing_passes - # an explicit property value is checked against maximum (passing) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "alpha": - 1, - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_an_explicit_property_value_is_checked_against_maximum_failing_fails - # an explicit property value is checked against maximum (failing) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - "alpha": - 5, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - { - "alpha": - 5, - }, - _configuration=self._configuration - ) - self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(body=body) - - - - def test_post_uniqueitems_false_validation_request_body(self): - """Test case for post_uniqueitems_false_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_uniqueitems_false_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_non_unique_array_of_integers_is_valid_passes - # non-unique array of integers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_objects_is_valid_passes - # unique array of objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "baz", - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_nested_objects_is_valid_passes - # non-unique array of nested objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_objects_is_valid_passes - # non-unique array of objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_1_and_true_are_unique_passes - # 1 and true are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - True, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_integers_is_valid_passes - # unique array of integers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_arrays_is_valid_passes - # non-unique array of arrays is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - "foo", - ], - [ - "foo", - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_numbers_are_unique_if_mathematically_unequal_passes - # numbers are unique if mathematically unequal - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1.0, - 1.0, - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_false_is_not_equal_to_zero_passes - # false is not equal to zero - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 0, - False, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_nested_objects_is_valid_passes - # unique array of nested objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - False, - }, - }, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_0_and_false_are_unique_passes - # 0 and false are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 0, - False, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_arrays_is_valid_passes - # unique array of arrays is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_true_is_not_equal_to_one_passes - # true is not equal to one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - True, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_heterogeneous_types_are_valid_passes - # non-unique heterogeneous types are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_heterogeneous_types_are_valid_passes - # unique heterogeneous types are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - 1, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_false_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_uniqueitems_validation_request_body(self): - """Test case for post_uniqueitems_validation_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_uniqueitems_validation_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_unique_array_of_objects_is_valid_passes - # unique array of objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "baz", - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_true_and_a1_are_unique_passes - # {"a": true} and {"a": 1} are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "a": - True, - }, - { - "a": - 1, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_heterogeneous_types_are_invalid_fails - # non-unique heterogeneous types are invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_nested0_and_false_are_unique_passes - # nested [0] and [false] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - [ - 0, - ], - "foo", - ], - [ - [ - False, - ], - "foo", - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_a_false_and_a0_are_unique_passes - # {"a": false} and {"a": 0} are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "a": - False, - }, - { - "a": - 0, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_numbers_are_unique_if_mathematically_unequal_fails - # numbers are unique if mathematically unequal - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1.0, - 1.0, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1.0, - 1.0, - 1, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_false_is_not_equal_to_zero_passes - # false is not equal to zero - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 0, - False, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_0_and_false_are_unique_passes - # [0] and [false] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - 0, - ], - [ - False, - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_arrays_is_valid_passes - # unique array of arrays is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_nested_objects_is_invalid_fails - # non-unique array of nested objects is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_non_unique_array_of_more_than_two_integers_is_invalid_fails - # non-unique array of more than two integers is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1, - 2, - 1, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_true_is_not_equal_to_one_passes - # true is not equal to one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - True, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_objects_are_non_unique_despite_key_order_fails - # objects are non-unique despite key order - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "a": - 1, - "b": - 2, - }, - { - "b": - 2, - "a": - 1, - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "a": - 1, - "b": - 2, - }, - { - "b": - 2, - "a": - 1, - }, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_unique_array_of_strings_is_valid_passes - # unique array of strings is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - "foo", - "bar", - "baz", - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_1_and_true_are_unique_passes - # [1] and [true] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - 1, - ], - [ - True, - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_different_objects_are_unique_passes - # different objects are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "a": - 1, - "b": - 2, - }, - { - "a": - 2, - "b": - 1, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_array_of_integers_is_valid_passes - # unique array of integers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 2, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_more_than_two_arrays_is_invalid_fails - # non-unique array of more than two arrays is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - [ - "foo", - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - "foo", - ], - [ - "bar", - ], - [ - "foo", - ], - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_non_unique_array_of_objects_is_invalid_fails - # non-unique array of objects is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_unique_array_of_nested_objects_is_valid_passes - # unique array of nested objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - False, - }, - }, - }, - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_arrays_is_invalid_fails - # non-unique array of arrays is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - "foo", - ], - [ - "foo", - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - [ - "foo", - ], - [ - "foo", - ], - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_non_unique_array_of_strings_is_invalid_fails - # non-unique array of strings is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - "foo", - "bar", - "foo", - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - "foo", - "bar", - "foo", - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - # test_nested1_and_true_are_unique_passes - # nested [1] and [true] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - [ - [ - 1, - ], - "foo", - ], - [ - [ - True, - ], - "foo", - ], - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_unique_heterogeneous_types_are_valid_passes - # unique heterogeneous types are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - 1, - "{}", - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uniqueitems_validation_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_non_unique_array_of_integers_is_invalid_fails - # non-unique array of integers is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - 1, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - [ - 1, - 1, - ], - _configuration=self._configuration - ) - self.api.post_uniqueitems_validation_request_body(body=body) - - - - def test_post_uri_format_request_body(self): - """Test case for post_uri_format_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_uri_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_uri_reference_format_request_body(self): - """Test case for post_uri_reference_format_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_uri_reference_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_reference_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - def test_post_uri_template_format_request_body(self): - """Test case for post_uri_template_format_request_body - - """ - from unit_test_api.api.request_body_api_endpoints import post_uri_template_format_request_body as endpoint_module - response_status = 200 - response_body = '' - content_type = 'application/json' - - # test_all_string_formats_ignore_objects_passes - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - { - } - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_booleans_passes - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - False - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_integers_passes - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 12 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_floats_passes - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - 13.7 - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_arrays_passes - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - [ - ] - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - # test_all_string_formats_ignore_nulls_passes - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - request_payload = ( - None - ) - body = endpoint_module.SchemaForRequestBodyApplicationJson._from_openapi_data( - request_payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(response_body), - status=response_status - ) - api_response = self.api.post_uri_template_format_request_body( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='POST', - body=self.json_bytes(request_payload), - content_type=content_type, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - # TODO if response body is unset check that it is unset here - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_response_content_content_type_schema_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_response_content_content_type_schema_api.py new file mode 100644 index 00000000000..a383bf92d18 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/test/test_response_content_content_type_schema_api.py @@ -0,0 +1,11031 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + + The version of the OpenAPI document: 0.0.1 + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import unit_test_api +from unit_test_api.api.response_content_content_type_schema_api import ResponseContentContentTypeSchemaApi # noqa: E501 +from unit_test_api import configuration, schemas, api_client + +from . import ApiTestMixin + + +class TestResponseContentContentTypeSchemaApi(ApiTestMixin, unittest.TestCase): + """ResponseContentContentTypeSchemaApi unit test stubs""" + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = ResponseContentContentTypeSchemaApi(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + def test_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types(self): + """Test case for post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_no_additional_properties_is_valid_passes + # no additional properties is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_additional_invalid_property_is_invalid_fails + # an additional invalid property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + 12, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_additional_valid_property_is_valid_passes + # an additional valid property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_additionalproperties_are_allowed_by_default_response_body_for_content_types(self): + """Test case for post_additionalproperties_are_allowed_by_default_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_additionalproperties_are_allowed_by_default_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_additional_properties_are_allowed_passes + # additional properties are allowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "quux": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_additionalproperties_can_exist_by_itself_response_body_for_content_types(self): + """Test case for post_additionalproperties_can_exist_by_itself_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_additionalproperties_can_exist_by_itself_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_additional_invalid_property_is_invalid_fails + # an additional invalid property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_additional_valid_property_is_valid_passes + # an additional valid property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types(self): + """Test case for post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_properties_defined_in_allof_are_not_examined_fails + # properties defined in allOf are not examined + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_valid_test_case_passes + # valid test case + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + False, + "bar": + True, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_combined_with_anyof_oneof_response_body_for_content_types(self): + """Test case for post_allof_combined_with_anyof_oneof_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_allof_combined_with_anyof_oneof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_allof_true_anyof_false_oneof_false_fails + # allOf: true, anyOf: false, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_false_oneof_true_fails + # allOf: false, anyOf: false, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_true_oneof_true_fails + # allOf: false, anyOf: true, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 15 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_true_anyof_true_oneof_false_fails + # allOf: true, anyOf: true, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_true_anyof_true_oneof_true_passes + # allOf: true, anyOf: true, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 30 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_allof_true_anyof_false_oneof_true_fails + # allOf: true, anyOf: false, oneOf: true + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 10 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_true_oneof_false_fails + # allOf: false, anyOf: true, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_allof_false_anyof_false_oneof_false_fails + # allOf: false, anyOf: false, oneOf: false + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_combined_with_anyof_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_response_body_for_content_types(self): + """Test case for post_allof_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_allof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_allof_passes + # allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_first_fails + # mismatch first + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_second_fails + # mismatch second + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_wrong_type_fails + # wrong type + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + "quux", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_simple_types_response_body_for_content_types(self): + """Test case for post_allof_simple_types_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_allof_simple_types_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_passes + # valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 25 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_simple_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofSimpleTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_one_fails + # mismatch one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 35 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_simple_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofSimpleTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_with_base_schema_response_body_for_content_types(self): + """Test case for post_allof_with_base_schema_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_allof_with_base_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_passes + # valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "bar": + 2, + "baz": + None, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_first_allof_fails + # mismatch first allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + "baz": + None, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "baz": + None, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_both_fails + # mismatch both + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_second_allof_fails + # mismatch second allOf + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "quux", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_allof_with_one_empty_schema_response_body_for_content_types(self): + """Test case for post_allof_with_one_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_allof_with_one_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_any_data_is_valid_passes + # any data is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_one_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_with_the_first_empty_schema_response_body_for_content_types(self): + """Test case for post_allof_with_the_first_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_allof_with_the_first_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_string_is_invalid_fails + # string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_the_first_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_the_first_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_with_the_last_empty_schema_response_body_for_content_types(self): + """Test case for post_allof_with_the_last_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_allof_with_the_last_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_string_is_invalid_fails + # string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_allof_with_the_last_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_the_last_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_allof_with_two_empty_schemas_response_body_for_content_types(self): + """Test case for post_allof_with_two_empty_schemas_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_allof_with_two_empty_schemas_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_any_data_is_valid_passes + # any data is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_allof_with_two_empty_schemas_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_anyof_complex_types_response_body_for_content_types(self): + """Test case for post_anyof_complex_types_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_anyof_complex_types_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_second_anyof_valid_complex_passes + # second anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_anyof_valid_complex_fails + # neither anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 2, + "bar": + "quux", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_anyof_valid_complex_passes + # both anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_first_anyof_valid_complex_passes + # first anyOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_anyof_response_body_for_content_types(self): + """Test case for post_anyof_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_anyof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_second_anyof_valid_passes + # second anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_anyof_valid_fails + # neither anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_anyof_valid_passes + # both anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_first_anyof_valid_passes + # first anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_anyof_with_base_schema_response_body_for_content_types(self): + """Test case for post_anyof_with_base_schema_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_anyof_with_base_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_one_anyof_valid_passes + # one anyOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_both_anyof_invalid_fails + # both anyOf invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_anyof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_anyof_with_one_empty_schema_response_body_for_content_types(self): + """Test case for post_anyof_with_one_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_anyof_with_one_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_string_is_valid_passes + # string is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_with_one_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_number_is_valid_passes + # number is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_anyof_with_one_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_array_type_matches_arrays_response_body_for_content_types(self): + """Test case for post_array_type_matches_arrays_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_array_type_matches_arrays_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_a_float_is_not_an_array_fails + # a float is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_an_array_fails + # a boolean is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_an_array_fails + # null is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_an_array_fails + # an object is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_an_array_fails + # a string is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_an_array_passes + # an array is an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_integer_is_not_an_array_fails + # an integer is not an array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_array_type_matches_arrays_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_boolean_type_matches_booleans_response_body_for_content_types(self): + """Test case for post_boolean_type_matches_booleans_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_boolean_type_matches_booleans_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_empty_string_is_not_a_boolean_fails + # an empty string is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_float_is_not_a_boolean_fails + # a float is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_a_boolean_fails + # null is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_zero_is_not_a_boolean_fails + # zero is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_a_boolean_fails + # an array is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_a_boolean_fails + # a string is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_false_is_a_boolean_passes + # false is a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_integer_is_not_a_boolean_fails + # an integer is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_a_boolean_passes + # true is a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_object_is_not_a_boolean_fails + # an object is not a boolean + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_boolean_type_matches_booleans_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_by_int_response_body_for_content_types(self): + """Test case for post_by_int_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_by_int_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_int_by_int_fail_fails + # int by int fail + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_by_int_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_int_by_int_passes + # int by int + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 10 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_int_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_int_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_by_number_response_body_for_content_types(self): + """Test case for post_by_number_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_by_number_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_45_is_multiple_of15_passes + # 4.5 is multiple of 1.5 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 4.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_35_is_not_multiple_of15_fails + # 35 is not multiple of 1.5 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 35 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_by_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_zero_is_multiple_of_anything_passes + # zero is multiple of anything + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_by_small_number_response_body_for_content_types(self): + """Test case for post_by_small_number_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_by_small_number_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_000751_is_not_multiple_of00001_fails + # 0.00751 is not multiple of 0.0001 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.00751 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_by_small_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBySmallNumberResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_00075_is_multiple_of00001_passes + # 0.0075 is multiple of 0.0001 + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0075 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_by_small_number_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postBySmallNumberResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_date_time_format_response_body_for_content_types(self): + """Test case for post_date_time_format_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_date_time_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_date_time_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_email_format_response_body_for_content_types(self): + """Test case for post_email_format_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_email_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_email_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_enum_with0_does_not_match_false_response_body_for_content_types(self): + """Test case for post_enum_with0_does_not_match_false_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_enum_with0_does_not_match_false_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_integer_zero_is_valid_passes + # integer zero is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with0_does_not_match_false_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_float_zero_is_valid_passes + # float zero is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with0_does_not_match_false_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_false_is_invalid_fails + # false is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with0_does_not_match_false_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enum_with1_does_not_match_true_response_body_for_content_types(self): + """Test case for post_enum_with1_does_not_match_true_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_enum_with1_does_not_match_true_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_true_is_invalid_fails + # true is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with1_does_not_match_true_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_integer_one_is_valid_passes + # integer one is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with1_does_not_match_true_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_float_one_is_valid_passes + # float one is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with1_does_not_match_true_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_enum_with_escaped_characters_response_body_for_content_types(self): + """Test case for post_enum_with_escaped_characters_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_enum_with_escaped_characters_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_member2_is_valid_passes + # member 2 is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo\rbar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_member1_is_valid_passes + # member 1 is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo\nbar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_another_string_is_invalid_fails + # another string is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "abc" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enum_with_false_does_not_match0_response_body_for_content_types(self): + """Test case for post_enum_with_false_does_not_match0_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_enum_with_false_does_not_match0_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_false_is_valid_passes + # false is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_false_does_not_match0_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_float_zero_is_invalid_fails + # float zero is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_false_does_not_match0_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_integer_zero_is_invalid_fails + # integer zero is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_false_does_not_match0_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enum_with_true_does_not_match1_response_body_for_content_types(self): + """Test case for post_enum_with_true_does_not_match1_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_enum_with_true_does_not_match1_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_float_one_is_invalid_fails + # float one is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_true_does_not_match1_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_valid_passes + # true is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enum_with_true_does_not_match1_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_integer_one_is_invalid_fails + # integer one is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enum_with_true_does_not_match1_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_enums_in_properties_response_body_for_content_types(self): + """Test case for post_enums_in_properties_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_enums_in_properties_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_missing_optional_property_is_valid_passes + # missing optional property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_wrong_foo_value_fails + # wrong foo value + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foot", + "bar": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_properties_are_valid_passes + # both properties are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + "bar": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_wrong_bar_value_fails + # wrong bar value + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + "bar": + "bart", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_missing_all_properties_is_invalid_fails + # missing all properties is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_missing_required_property_is_invalid_fails + # missing required property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "foo", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_enums_in_properties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_forbidden_property_response_body_for_content_types(self): + """Test case for post_forbidden_property_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_forbidden_property_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_present_fails + # property present + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_forbidden_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postForbiddenPropertyResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_property_absent_passes + # property absent + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 1, + "baz": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_forbidden_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postForbiddenPropertyResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_hostname_format_response_body_for_content_types(self): + """Test case for post_hostname_format_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_hostname_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_hostname_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_integer_type_matches_integers_response_body_for_content_types(self): + """Test case for post_integer_type_matches_integers_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_integer_type_matches_integers_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_object_is_not_an_integer_fails + # an object is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_an_integer_fails + # a string is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_an_integer_fails + # null is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_float_with_zero_fractional_part_is_an_integer_passes + # a float with zero fractional part is an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_float_is_not_an_integer_fails + # a float is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_an_integer_fails + # a boolean is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_an_integer_passes + # an integer is an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails + # a string is still not an integer, even if it looks like one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_an_integer_fails + # an array is not an integer + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_integer_type_matches_integers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types(self): + """Test case for post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails + # always invalid, but naive implementations may raise an overflow error + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0E308 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_valid_integer_with_multipleof_float_passes + # valid integer with multipleOf float + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123456789 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_invalid_string_value_for_default_response_body_for_content_types(self): + """Test case for post_invalid_string_value_for_default_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_invalid_string_value_for_default_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_when_property_is_specified_passes + # valid when property is specified + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + "good", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_invalid_string_value_for_default_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_still_valid_when_the_invalid_default_is_used_passes + # still valid when the invalid default is used + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_invalid_string_value_for_default_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_ipv4_format_response_body_for_content_types(self): + """Test case for post_ipv4_format_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_ipv4_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv4_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_ipv6_format_response_body_for_content_types(self): + """Test case for post_ipv6_format_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_ipv6_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ipv6_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_json_pointer_format_response_body_for_content_types(self): + """Test case for post_json_pointer_format_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_json_pointer_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_json_pointer_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maximum_validation_response_body_for_content_types(self): + """Test case for post_maximum_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_maximum_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_below_the_maximum_is_valid_passes + # below the maximum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_above_the_maximum_is_invalid_fails + # above the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maximum_validation_with_unsigned_integer_response_body_for_content_types(self): + """Test case for post_maximum_validation_with_unsigned_integer_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_maximum_validation_with_unsigned_integer_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_below_the_maximum_is_invalid_passes + # below the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 299.97 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_above_the_maximum_is_invalid_fails + # above the maximum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_boundary_point_integer_is_valid_passes + # boundary point integer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_boundary_point_float_is_valid_passes + # boundary point float is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 300.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maxitems_validation_response_body_for_content_types(self): + """Test case for post_maxitems_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_maxitems_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 3, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_arrays_passes + # ignores non-arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maxlength_validation_response_body_for_content_types(self): + """Test case for post_maxlength_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_maxlength_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_strings_passes + # ignores non-strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 100 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "f" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_two_supplementary_unicode_code_points_is_long_enough_passes + # two supplementary Unicode code points is long enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "💩💩" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "fo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types(self): + """Test case for post_maxproperties0_means_the_object_is_empty_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_maxproperties0_means_the_object_is_empty_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_no_properties_is_valid_passes + # no properties is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_one_property_is_invalid_fails + # one property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_maxproperties_validation_response_body_for_content_types(self): + """Test case for post_maxproperties_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_maxproperties_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_long_is_invalid_fails + # too long is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + "baz": + 3, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 3, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_shorter_is_valid_passes + # shorter is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_maxproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minimum_validation_response_body_for_content_types(self): + """Test case for post_minimum_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_minimum_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_below_the_minimum_is_invalid_fails + # below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0.6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_above_the_minimum_is_valid_passes + # above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.6 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minimum_validation_with_signed_integer_response_body_for_content_types(self): + """Test case for post_minimum_validation_with_signed_integer_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_minimum_validation_with_signed_integer_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_boundary_point_is_valid_passes + # boundary point is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_positive_above_the_minimum_is_valid_passes + # positive above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_int_below_the_minimum_is_invalid_fails + # int below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_float_below_the_minimum_is_invalid_fails + # float below the minimum is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2.0001 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_boundary_point_with_float_is_valid_passes + # boundary point with float is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -2.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_negative_above_the_minimum_is_valid_passes + # negative above the minimum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + -1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_numbers_passes + # ignores non-numbers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "x" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minimum_validation_with_signed_integer_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minitems_validation_response_body_for_content_types(self): + """Test case for post_minitems_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_minitems_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_non_arrays_passes + # ignores non-arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minlength_validation_response_body_for_content_types(self): + """Test case for post_minlength_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_minlength_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "f" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_supplementary_unicode_code_point_is_not_long_enough_fails + # one supplementary Unicode code point is not long enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "💩" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_non_strings_passes + # ignores non-strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "fo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minlength_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_minproperties_validation_response_body_for_content_types(self): + """Test case for post_minproperties_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_minproperties_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_too_short_is_invalid_fails + # too short is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_longer_is_valid_passes + # longer is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_exact_length_is_valid_passes + # exact length is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_minproperties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_nested_allof_to_check_validation_semantics_response_body_for_content_types(self): + """Test case for post_nested_allof_to_check_validation_semantics_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_nested_allof_to_check_validation_semantics_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types(self): + """Test case for post_nested_anyof_to_check_validation_semantics_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_nested_anyof_to_check_validation_semantics_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_nested_items_response_body_for_content_types(self): + """Test case for post_nested_items_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_nested_items_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_valid_nested_array_passes + # valid nested array + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + [ + 1, + ], + ], + [ + [ + 2, + ], + [ + 3, + ], + ], + ], + [ + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_nested_array_with_invalid_type_fails + # nested array with invalid type + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + [ + "1", + ], + ], + [ + [ + 2, + ], + [ + 3, + ], + ], + ], + [ + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_not_deep_enough_fails + # not deep enough + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 1, + ], + [ + 2, + ], + [ + 3, + ], + ], + [ + [ + 4, + ], + [ + 5, + ], + [ + 6, + ], + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types(self): + """Test case for post_nested_oneof_to_check_validation_semantics_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_nested_oneof_to_check_validation_semantics_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_anything_non_null_is_invalid_fails + # anything non-null is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_valid_passes + # null is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_not_more_complex_schema_response_body_for_content_types(self): + """Test case for post_not_more_complex_schema_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_not_more_complex_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_other_match_passes + # other match + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_not_more_complex_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_mismatch_fails + # mismatch + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "bar", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_not_more_complex_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_match_passes + # match + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_not_more_complex_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_not_response_body_for_content_types(self): + """Test case for post_not_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_not_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_allowed_passes + # allowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_not_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_disallowed_fails + # disallowed + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_not_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNotResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_nul_characters_in_strings_response_body_for_content_types(self): + """Test case for post_nul_characters_in_strings_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_nul_characters_in_strings_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_match_string_with_nul_passes + # match string with nul + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "hello\x00there" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_nul_characters_in_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNulCharactersInStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_do_not_match_string_lacking_nul_fails + # do not match string lacking nul + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "hellothere" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_nul_characters_in_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNulCharactersInStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_null_type_matches_only_the_null_object_response_body_for_content_types(self): + """Test case for post_null_type_matches_only_the_null_object_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_null_type_matches_only_the_null_object_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_a_float_is_not_null_fails + # a float is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_null_fails + # an object is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_false_is_not_null_fails + # false is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_not_null_fails + # an integer is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_not_null_fails + # true is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_zero_is_not_null_fails + # zero is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_empty_string_is_not_null_fails + # an empty string is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_null_passes + # null is null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_array_is_not_null_fails + # an array is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_null_fails + # a string is not null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_null_type_matches_only_the_null_object_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_number_type_matches_numbers_response_body_for_content_types(self): + """Test case for post_number_type_matches_numbers_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_number_type_matches_numbers_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_an_array_is_not_a_number_fails + # an array is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_a_number_fails + # null is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_a_number_fails + # an object is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_a_number_fails + # a boolean is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_float_is_a_number_passes + # a float is a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails + # a string is still not a number, even if it looks like one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_not_a_number_fails + # a string is not a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_a_number_passes + # an integer is a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes + # a float with zero fractional part is a number (and an integer) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_number_type_matches_numbers_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_object_properties_validation_response_body_for_content_types(self): + """Test case for post_object_properties_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_object_properties_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_one_property_invalid_is_invalid_fails + # one property invalid is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + { + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_properties_present_and_valid_is_valid_passes + # both properties present and valid is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + "bar": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_doesn_t_invalidate_other_properties_passes + # doesn't invalidate other properties + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "quux": + [ + ], + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_both_properties_invalid_is_invalid_fails + # both properties invalid is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + [ + ], + "bar": + { + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_properties_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_object_type_matches_objects_response_body_for_content_types(self): + """Test case for post_object_type_matches_objects_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_object_type_matches_objects_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_a_float_is_not_an_object_fails + # a float is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_an_object_fails + # null is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_an_object_fails + # an array is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_an_object_passes + # an object is an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_string_is_not_an_object_fails + # a string is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_integer_is_not_an_object_fails + # an integer is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_an_object_fails + # a boolean is not an object + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_object_type_matches_objects_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_oneof_complex_types_response_body_for_content_types(self): + """Test case for post_oneof_complex_types_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_oneof_complex_types_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_first_oneof_valid_complex_passes + # first oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_oneof_valid_complex_fails + # neither oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 2, + "bar": + "quux", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_both_oneof_valid_complex_fails + # both oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + "bar": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_second_oneof_valid_complex_passes + # second oneOf valid (complex) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + "baz", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_complex_types_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_oneof_response_body_for_content_types(self): + """Test case for post_oneof_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_oneof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_second_oneof_valid_passes + # second oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 2.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_both_oneof_valid_fails + # both oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_first_oneof_valid_passes + # first oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_neither_oneof_valid_fails + # neither oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.5 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_oneof_with_base_schema_response_body_for_content_types(self): + """Test case for post_oneof_with_base_schema_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_oneof_with_base_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_both_oneof_valid_fails + # both oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_mismatch_base_schema_fails + # mismatch base schema + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 3 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_oneof_valid_passes + # one oneOf valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foobar" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_with_base_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_oneof_with_empty_schema_response_body_for_content_types(self): + """Test case for post_oneof_with_empty_schema_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_oneof_with_empty_schema_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_both_valid_invalid_fails + # both valid - invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_oneof_with_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_valid_valid_passes + # one valid - valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_oneof_with_empty_schema_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_pattern_is_not_anchored_response_body_for_content_types(self): + """Test case for post_pattern_is_not_anchored_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_pattern_is_not_anchored_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_matches_a_substring_passes + # matches a substring + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "xxaayy" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_is_not_anchored_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_pattern_validation_response_body_for_content_types(self): + """Test case for post_pattern_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_pattern_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_objects_passes + # ignores objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_null_passes + # ignores null + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_floats_passes + # ignores floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.0 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_non_matching_pattern_is_invalid_fails + # a non-matching pattern is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "abc" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_ignores_booleans_passes + # ignores booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_matching_pattern_is_valid_passes + # a matching pattern is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "aaa" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_integers_passes + # ignores integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 123 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_pattern_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_properties_with_escaped_characters_response_body_for_content_types(self): + """Test case for post_properties_with_escaped_characters_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_properties_with_escaped_characters_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_object_with_all_numbers_is_valid_passes + # object with all numbers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo\nbar": + 1, + "foo\"bar": + 1, + "foo\\bar": + 1, + "foo\rbar": + 1, + "foo\tbar": + 1, + "foo\fbar": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_properties_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_object_with_strings_is_invalid_fails + # object with strings is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo\nbar": + "1", + "foo\"bar": + "1", + "foo\\bar": + "1", + "foo\rbar": + "1", + "foo\tbar": + "1", + "foo\fbar": + "1", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_properties_with_escaped_characters_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types(self): + """Test case for post_property_named_ref_that_is_not_a_reference_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_property_named_ref_that_is_not_a_reference_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_additionalproperties_response_body_for_content_types(self): + """Test case for post_ref_in_additionalproperties_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_ref_in_additionalproperties_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "someProp": + { + "$ref": + "a", + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_additionalproperties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "someProp": + { + "$ref": + 2, + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_additionalproperties_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_allof_response_body_for_content_types(self): + """Test case for post_ref_in_allof_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_ref_in_allof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAllofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_allof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAllofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_anyof_response_body_for_content_types(self): + """Test case for post_ref_in_anyof_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_ref_in_anyof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAnyofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_anyof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInAnyofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_items_response_body_for_content_types(self): + """Test case for post_ref_in_items_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_ref_in_items_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "$ref": + "a", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInItemsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "$ref": + 2, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_items_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInItemsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_oneof_response_body_for_content_types(self): + """Test case for post_ref_in_oneof_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_ref_in_oneof_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + "a", + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInOneofResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "$ref": + 2, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_oneof_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInOneofResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_ref_in_property_response_body_for_content_types(self): + """Test case for post_ref_in_property_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_ref_in_property_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_named_ref_valid_passes + # property named $ref valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "a": + { + "$ref": + "a", + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_ref_in_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInPropertyResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_property_named_ref_invalid_fails + # property named $ref invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "a": + { + "$ref": + 2, + }, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_ref_in_property_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRefInPropertyResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_required_default_validation_response_body_for_content_types(self): + """Test case for post_required_default_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_required_default_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_not_required_by_default_passes + # not required by default + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_default_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_required_validation_response_body_for_content_types(self): + """Test case for post_required_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_required_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_ignores_arrays_passes + # ignores arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_present_required_property_is_valid_passes + # present required property is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "foo": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_other_non_objects_passes + # ignores other non-objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_ignores_strings_passes + # ignores strings + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_present_required_property_is_invalid_fails + # non-present required property is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "bar": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_required_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_required_with_empty_array_response_body_for_content_types(self): + """Test case for post_required_with_empty_array_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_required_with_empty_array_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_property_not_required_passes + # property not required + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_required_with_empty_array_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_simple_enum_validation_response_body_for_content_types(self): + """Test case for post_simple_enum_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_simple_enum_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_something_else_is_invalid_fails + # something else is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 4 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_simple_enum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postSimpleEnumValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_one_of_the_enum_is_valid_passes + # one of the enum is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_simple_enum_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postSimpleEnumValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_string_type_matches_strings_response_body_for_content_types(self): + """Test case for post_string_type_matches_strings_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_string_type_matches_strings_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_1_is_not_a_string_fails + # 1 is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes + # a string is still a string, even if it looks like a number + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "1" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_empty_string_is_still_a_string_passes + # an empty string is still a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_float_is_not_a_string_fails + # a float is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 1.1 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_object_is_not_a_string_fails + # an object is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_an_array_is_not_a_string_fails + # an array is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_boolean_is_not_a_string_fails + # a boolean is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + True + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_null_is_not_a_string_fails + # null is not a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_a_string_is_a_string_passes + # a string is a string + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + "foo" + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_string_type_matches_strings_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types(self): + """Test case for post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_missing_properties_are_not_filled_in_with_the_default_passes + # missing properties are not filled in with the default + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_explicit_property_value_is_checked_against_maximum_passing_passes + # an explicit property value is checked against maximum (passing) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "alpha": + 1, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_an_explicit_property_value_is_checked_against_maximum_failing_fails + # an explicit property value is checked against maximum (failing) + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "alpha": + 5, + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_uniqueitems_false_validation_response_body_for_content_types(self): + """Test case for post_uniqueitems_false_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_uniqueitems_false_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_non_unique_array_of_integers_is_valid_passes + # non-unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_objects_is_valid_passes + # unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "baz", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_nested_objects_is_valid_passes + # non-unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_objects_is_valid_passes + # non-unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "bar", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_1_and_true_are_unique_passes + # 1 and true are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_integers_is_valid_passes + # unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_arrays_is_valid_passes + # non-unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_numbers_are_unique_if_mathematically_unequal_passes + # numbers are unique if mathematically unequal + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1.0, + 1.0, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_false_is_not_equal_to_zero_passes + # false is not equal to zero + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_nested_objects_is_valid_passes + # unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + False, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_0_and_false_are_unique_passes + # 0 and false are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_arrays_is_valid_passes + # unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_true_is_not_equal_to_one_passes + # true is not equal to one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_heterogeneous_types_are_valid_passes + # non-unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + { + }, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_heterogeneous_types_are_valid_passes + # unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_false_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_uniqueitems_validation_response_body_for_content_types(self): + """Test case for post_uniqueitems_validation_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_uniqueitems_validation_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_unique_array_of_objects_is_valid_passes + # unique array of objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "baz", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_true_and_a1_are_unique_passes + # {"a": true} and {"a": 1} are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + True, + }, + { + "a": + 1, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_heterogeneous_types_are_invalid_fails + # non-unique heterogeneous types are invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + { + }, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_nested0_and_false_are_unique_passes + # nested [0] and [false] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 0, + ], + "foo", + ], + [ + [ + False, + ], + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_a_false_and_a0_are_unique_passes + # {"a": false} and {"a": 0} are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + False, + }, + { + "a": + 0, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_numbers_are_unique_if_mathematically_unequal_fails + # numbers are unique if mathematically unequal + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1.0, + 1.0, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_false_is_not_equal_to_zero_passes + # false is not equal to zero + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 0, + False, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_0_and_false_are_unique_passes + # [0] and [false] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + 0, + ], + [ + False, + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_arrays_is_valid_passes + # unique array of arrays is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_nested_objects_is_invalid_fails + # non-unique array of nested objects is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_non_unique_array_of_more_than_two_integers_is_invalid_fails + # non-unique array of more than two integers is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_true_is_not_equal_to_one_passes + # true is not equal to one + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + True, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_objects_are_non_unique_despite_key_order_fails + # objects are non-unique despite key order + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + 1, + "b": + 2, + }, + { + "b": + 2, + "a": + 1, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_unique_array_of_strings_is_valid_passes + # unique array of strings is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + "foo", + "bar", + "baz", + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_1_and_true_are_unique_passes + # [1] and [true] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + 1, + ], + [ + True, + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_different_objects_are_unique_passes + # different objects are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "a": + 1, + "b": + 2, + }, + { + "a": + 2, + "b": + 1, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_array_of_integers_is_valid_passes + # unique array of integers is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 2, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_more_than_two_arrays_is_invalid_fails + # non-unique array of more than two arrays is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "bar", + ], + [ + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_non_unique_array_of_objects_is_invalid_fails + # non-unique array of objects is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + "bar", + }, + { + "foo": + "bar", + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_unique_array_of_nested_objects_is_valid_passes + # unique array of nested objects is valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + "foo": + { + "bar": + { + "baz": + True, + }, + }, + }, + { + "foo": + { + "bar": + { + "baz": + False, + }, + }, + }, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_arrays_is_invalid_fails + # non-unique array of arrays is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + "foo", + ], + [ + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_non_unique_array_of_strings_is_invalid_fails + # non-unique array of strings is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + "foo", + "bar", + "foo", + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + # test_nested1_and_true_are_unique_passes + # nested [1] and [true] are unique + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + [ + [ + 1, + ], + "foo", + ], + [ + [ + True, + ], + "foo", + ], + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_unique_heterogeneous_types_are_valid_passes + # unique heterogeneous types are valid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + { + }, + [ + 1, + ], + True, + None, + 1, + "{}", + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_non_unique_array_of_integers_is_invalid_fails + # non-unique array of integers is invalid + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + 1, + 1, + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): + self.api.post_uniqueitems_validation_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', + method='POST', + content_type=None, + accept_content_type=accept_content_type, + ) + + + pass + + def test_post_uri_format_response_body_for_content_types(self): + """Test case for post_uri_format_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_uri_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_uri_reference_format_response_body_for_content_types(self): + """Test case for post_uri_reference_format_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_uri_reference_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_reference_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + def test_post_uri_template_format_response_body_for_content_types(self): + """Test case for post_uri_template_format_response_body_for_content_types + + """ + from unit_test_api.api.response_content_content_type_schema_api_endpoints import post_uri_template_format_response_body_for_content_types as endpoint_module + response_status = 200 + accept_content_type = 'application/json' + + + # test_all_string_formats_ignore_objects_passes + # all string formats ignore objects + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_booleans_passes + # all string formats ignore booleans + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + False + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_integers_passes + # all string formats ignore integers + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 12 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_floats_passes + # all string formats ignore floats + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + 13.7 + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_arrays_passes + # all string formats ignore arrays + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + [ + ] + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + # test_all_string_formats_ignore_nulls_passes + # all string formats ignore nulls + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + None + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=response_status + ) + api_response = self.api.post_uri_template_format_response_body_for_content_types( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', + method='POST', + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, endpoint_module.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = endpoint_module.SchemaFor200ResponseBodyApplicationJson._from_openapi_data( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + + + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/__init__.py index 7adbd86e57e..ca76268b74a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/__init__.py @@ -1,3 +1,3 @@ # do not import all apis into this module because that uses a lot of memory and stack frames # if you need the ability to import all apis from one package, import them with -# from unit_test_api.apis import JsonApi +# from unit_test_api.apis import ContentTypeJsonApi diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api.py new file mode 100644 index 00000000000..b54d8279f99 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api.py @@ -0,0 +1,359 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + + The version of the OpenAPI document: 0.0.1 + Generated by: https://openapi-generator.tech +""" + +from unit_test_api.api_client import ApiClient +from unit_test_api.api.content_type_json_api_endpoints.post_additionalproperties_allows_a_schema_which_should_validate_request_body import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_additionalproperties_are_allowed_by_default_request_body import PostAdditionalpropertiesAreAllowedByDefaultRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_additionalproperties_are_allowed_by_default_response_body_for_content_types import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_additionalproperties_can_exist_by_itself_request_body import PostAdditionalpropertiesCanExistByItselfRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_additionalproperties_can_exist_by_itself_response_body_for_content_types import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_additionalproperties_should_not_look_in_applicators_request_body import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_allof_combined_with_anyof_oneof_request_body import PostAllofCombinedWithAnyofOneofRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_allof_combined_with_anyof_oneof_response_body_for_content_types import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_allof_request_body import PostAllofRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_allof_response_body_for_content_types import PostAllofResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_allof_simple_types_request_body import PostAllofSimpleTypesRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_allof_simple_types_response_body_for_content_types import PostAllofSimpleTypesResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_allof_with_base_schema_request_body import PostAllofWithBaseSchemaRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_allof_with_base_schema_response_body_for_content_types import PostAllofWithBaseSchemaResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_allof_with_one_empty_schema_request_body import PostAllofWithOneEmptySchemaRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_allof_with_one_empty_schema_response_body_for_content_types import PostAllofWithOneEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_allof_with_the_first_empty_schema_request_body import PostAllofWithTheFirstEmptySchemaRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_allof_with_the_first_empty_schema_response_body_for_content_types import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_allof_with_the_last_empty_schema_request_body import PostAllofWithTheLastEmptySchemaRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_allof_with_the_last_empty_schema_response_body_for_content_types import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_allof_with_two_empty_schemas_request_body import PostAllofWithTwoEmptySchemasRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_allof_with_two_empty_schemas_response_body_for_content_types import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_anyof_complex_types_request_body import PostAnyofComplexTypesRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_anyof_complex_types_response_body_for_content_types import PostAnyofComplexTypesResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_anyof_request_body import PostAnyofRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_anyof_response_body_for_content_types import PostAnyofResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_anyof_with_base_schema_request_body import PostAnyofWithBaseSchemaRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_anyof_with_base_schema_response_body_for_content_types import PostAnyofWithBaseSchemaResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_anyof_with_one_empty_schema_request_body import PostAnyofWithOneEmptySchemaRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_anyof_with_one_empty_schema_response_body_for_content_types import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_array_type_matches_arrays_request_body import PostArrayTypeMatchesArraysRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_array_type_matches_arrays_response_body_for_content_types import PostArrayTypeMatchesArraysResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_boolean_type_matches_booleans_request_body import PostBooleanTypeMatchesBooleansRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_boolean_type_matches_booleans_response_body_for_content_types import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_by_int_request_body import PostByIntRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_by_int_response_body_for_content_types import PostByIntResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_by_number_request_body import PostByNumberRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_by_number_response_body_for_content_types import PostByNumberResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_by_small_number_request_body import PostBySmallNumberRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_by_small_number_response_body_for_content_types import PostBySmallNumberResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_date_time_format_request_body import PostDateTimeFormatRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_date_time_format_response_body_for_content_types import PostDateTimeFormatResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_email_format_request_body import PostEmailFormatRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_email_format_response_body_for_content_types import PostEmailFormatResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_enum_with0_does_not_match_false_request_body import PostEnumWith0DoesNotMatchFalseRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_enum_with0_does_not_match_false_response_body_for_content_types import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_enum_with1_does_not_match_true_request_body import PostEnumWith1DoesNotMatchTrueRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_enum_with1_does_not_match_true_response_body_for_content_types import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_enum_with_escaped_characters_request_body import PostEnumWithEscapedCharactersRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_enum_with_escaped_characters_response_body_for_content_types import PostEnumWithEscapedCharactersResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_enum_with_false_does_not_match0_request_body import PostEnumWithFalseDoesNotMatch0RequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_enum_with_false_does_not_match0_response_body_for_content_types import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_enum_with_true_does_not_match1_request_body import PostEnumWithTrueDoesNotMatch1RequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_enum_with_true_does_not_match1_response_body_for_content_types import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_enums_in_properties_request_body import PostEnumsInPropertiesRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_enums_in_properties_response_body_for_content_types import PostEnumsInPropertiesResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_forbidden_property_request_body import PostForbiddenPropertyRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_forbidden_property_response_body_for_content_types import PostForbiddenPropertyResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_hostname_format_request_body import PostHostnameFormatRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_hostname_format_response_body_for_content_types import PostHostnameFormatResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_integer_type_matches_integers_request_body import PostIntegerTypeMatchesIntegersRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_integer_type_matches_integers_response_body_for_content_types import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_invalid_string_value_for_default_request_body import PostInvalidStringValueForDefaultRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_invalid_string_value_for_default_response_body_for_content_types import PostInvalidStringValueForDefaultResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_ipv4_format_request_body import PostIpv4FormatRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_ipv4_format_response_body_for_content_types import PostIpv4FormatResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_ipv6_format_request_body import PostIpv6FormatRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_ipv6_format_response_body_for_content_types import PostIpv6FormatResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_json_pointer_format_request_body import PostJsonPointerFormatRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_json_pointer_format_response_body_for_content_types import PostJsonPointerFormatResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_maximum_validation_request_body import PostMaximumValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_maximum_validation_response_body_for_content_types import PostMaximumValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_maximum_validation_with_unsigned_integer_request_body import PostMaximumValidationWithUnsignedIntegerRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_maximum_validation_with_unsigned_integer_response_body_for_content_types import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_maxitems_validation_request_body import PostMaxitemsValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_maxitems_validation_response_body_for_content_types import PostMaxitemsValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_maxlength_validation_request_body import PostMaxlengthValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_maxlength_validation_response_body_for_content_types import PostMaxlengthValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_maxproperties0_means_the_object_is_empty_request_body import PostMaxproperties0MeansTheObjectIsEmptyRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_maxproperties_validation_request_body import PostMaxpropertiesValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_maxproperties_validation_response_body_for_content_types import PostMaxpropertiesValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_minimum_validation_request_body import PostMinimumValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_minimum_validation_response_body_for_content_types import PostMinimumValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_minimum_validation_with_signed_integer_request_body import PostMinimumValidationWithSignedIntegerRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_minimum_validation_with_signed_integer_response_body_for_content_types import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_minitems_validation_request_body import PostMinitemsValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_minitems_validation_response_body_for_content_types import PostMinitemsValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_minlength_validation_request_body import PostMinlengthValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_minlength_validation_response_body_for_content_types import PostMinlengthValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_minproperties_validation_request_body import PostMinpropertiesValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_minproperties_validation_response_body_for_content_types import PostMinpropertiesValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_nested_allof_to_check_validation_semantics_request_body import PostNestedAllofToCheckValidationSemanticsRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_nested_allof_to_check_validation_semantics_response_body_for_content_types import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_nested_anyof_to_check_validation_semantics_request_body import PostNestedAnyofToCheckValidationSemanticsRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_nested_items_request_body import PostNestedItemsRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_nested_items_response_body_for_content_types import PostNestedItemsResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_nested_oneof_to_check_validation_semantics_request_body import PostNestedOneofToCheckValidationSemanticsRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_not_more_complex_schema_request_body import PostNotMoreComplexSchemaRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_not_more_complex_schema_response_body_for_content_types import PostNotMoreComplexSchemaResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_not_request_body import PostNotRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_not_response_body_for_content_types import PostNotResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_nul_characters_in_strings_request_body import PostNulCharactersInStringsRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_nul_characters_in_strings_response_body_for_content_types import PostNulCharactersInStringsResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_null_type_matches_only_the_null_object_request_body import PostNullTypeMatchesOnlyTheNullObjectRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_null_type_matches_only_the_null_object_response_body_for_content_types import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_number_type_matches_numbers_request_body import PostNumberTypeMatchesNumbersRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_number_type_matches_numbers_response_body_for_content_types import PostNumberTypeMatchesNumbersResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_object_properties_validation_request_body import PostObjectPropertiesValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_object_properties_validation_response_body_for_content_types import PostObjectPropertiesValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_object_type_matches_objects_request_body import PostObjectTypeMatchesObjectsRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_object_type_matches_objects_response_body_for_content_types import PostObjectTypeMatchesObjectsResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_oneof_complex_types_request_body import PostOneofComplexTypesRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_oneof_complex_types_response_body_for_content_types import PostOneofComplexTypesResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_oneof_request_body import PostOneofRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_oneof_response_body_for_content_types import PostOneofResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_oneof_with_base_schema_request_body import PostOneofWithBaseSchemaRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_oneof_with_base_schema_response_body_for_content_types import PostOneofWithBaseSchemaResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_oneof_with_empty_schema_request_body import PostOneofWithEmptySchemaRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_oneof_with_empty_schema_response_body_for_content_types import PostOneofWithEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_pattern_is_not_anchored_request_body import PostPatternIsNotAnchoredRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_pattern_is_not_anchored_response_body_for_content_types import PostPatternIsNotAnchoredResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_pattern_validation_request_body import PostPatternValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_pattern_validation_response_body_for_content_types import PostPatternValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_properties_with_escaped_characters_request_body import PostPropertiesWithEscapedCharactersRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_properties_with_escaped_characters_response_body_for_content_types import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_property_named_ref_that_is_not_a_reference_request_body import PostPropertyNamedRefThatIsNotAReferenceRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_additionalproperties_request_body import PostRefInAdditionalpropertiesRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_additionalproperties_response_body_for_content_types import PostRefInAdditionalpropertiesResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_allof_request_body import PostRefInAllofRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_allof_response_body_for_content_types import PostRefInAllofResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_anyof_request_body import PostRefInAnyofRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_anyof_response_body_for_content_types import PostRefInAnyofResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_items_request_body import PostRefInItemsRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_items_response_body_for_content_types import PostRefInItemsResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_oneof_request_body import PostRefInOneofRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_oneof_response_body_for_content_types import PostRefInOneofResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_property_request_body import PostRefInPropertyRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_ref_in_property_response_body_for_content_types import PostRefInPropertyResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_required_default_validation_request_body import PostRequiredDefaultValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_required_default_validation_response_body_for_content_types import PostRequiredDefaultValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_required_validation_request_body import PostRequiredValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_required_validation_response_body_for_content_types import PostRequiredValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_required_with_empty_array_request_body import PostRequiredWithEmptyArrayRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_required_with_empty_array_response_body_for_content_types import PostRequiredWithEmptyArrayResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_simple_enum_validation_request_body import PostSimpleEnumValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_simple_enum_validation_response_body_for_content_types import PostSimpleEnumValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_string_type_matches_strings_request_body import PostStringTypeMatchesStringsRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_string_type_matches_strings_response_body_for_content_types import PostStringTypeMatchesStringsResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_uniqueitems_false_validation_request_body import PostUniqueitemsFalseValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_uniqueitems_false_validation_response_body_for_content_types import PostUniqueitemsFalseValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_uniqueitems_validation_request_body import PostUniqueitemsValidationRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_uniqueitems_validation_response_body_for_content_types import PostUniqueitemsValidationResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_uri_format_request_body import PostUriFormatRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_uri_format_response_body_for_content_types import PostUriFormatResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_uri_reference_format_request_body import PostUriReferenceFormatRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_uri_reference_format_response_body_for_content_types import PostUriReferenceFormatResponseBodyForContentTypes +from unit_test_api.api.content_type_json_api_endpoints.post_uri_template_format_request_body import PostUriTemplateFormatRequestBody +from unit_test_api.api.content_type_json_api_endpoints.post_uri_template_format_response_body_for_content_types import PostUriTemplateFormatResponseBodyForContentTypes + + +class ContentTypeJsonApi( + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, + PostAdditionalpropertiesAreAllowedByDefaultRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfRequestBody, + PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, + PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofRequestBody, + PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + PostAllofRequestBody, + PostAllofResponseBodyForContentTypes, + PostAllofSimpleTypesRequestBody, + PostAllofSimpleTypesResponseBodyForContentTypes, + PostAllofWithBaseSchemaRequestBody, + PostAllofWithBaseSchemaResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaRequestBody, + PostAllofWithOneEmptySchemaResponseBodyForContentTypes, + PostAllofWithTheFirstEmptySchemaRequestBody, + PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + PostAllofWithTheLastEmptySchemaRequestBody, + PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + PostAllofWithTwoEmptySchemasRequestBody, + PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + PostAnyofComplexTypesRequestBody, + PostAnyofComplexTypesResponseBodyForContentTypes, + PostAnyofRequestBody, + PostAnyofResponseBodyForContentTypes, + PostAnyofWithBaseSchemaRequestBody, + PostAnyofWithBaseSchemaResponseBodyForContentTypes, + PostAnyofWithOneEmptySchemaRequestBody, + PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + PostArrayTypeMatchesArraysRequestBody, + PostArrayTypeMatchesArraysResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansRequestBody, + PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + PostByIntRequestBody, + PostByIntResponseBodyForContentTypes, + PostByNumberRequestBody, + PostByNumberResponseBodyForContentTypes, + PostBySmallNumberRequestBody, + PostBySmallNumberResponseBodyForContentTypes, + PostDateTimeFormatRequestBody, + PostDateTimeFormatResponseBodyForContentTypes, + PostEmailFormatRequestBody, + PostEmailFormatResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseRequestBody, + PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + PostEnumWith1DoesNotMatchTrueRequestBody, + PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + PostEnumWithEscapedCharactersRequestBody, + PostEnumWithEscapedCharactersResponseBodyForContentTypes, + PostEnumWithFalseDoesNotMatch0RequestBody, + PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1RequestBody, + PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + PostEnumsInPropertiesRequestBody, + PostEnumsInPropertiesResponseBodyForContentTypes, + PostForbiddenPropertyRequestBody, + PostForbiddenPropertyResponseBodyForContentTypes, + PostHostnameFormatRequestBody, + PostHostnameFormatResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersRequestBody, + PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, + PostInvalidStringValueForDefaultRequestBody, + PostInvalidStringValueForDefaultResponseBodyForContentTypes, + PostIpv4FormatRequestBody, + PostIpv4FormatResponseBodyForContentTypes, + PostIpv6FormatRequestBody, + PostIpv6FormatResponseBodyForContentTypes, + PostJsonPointerFormatRequestBody, + PostJsonPointerFormatResponseBodyForContentTypes, + PostMaximumValidationRequestBody, + PostMaximumValidationResponseBodyForContentTypes, + PostMaximumValidationWithUnsignedIntegerRequestBody, + PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, + PostMaxitemsValidationRequestBody, + PostMaxitemsValidationResponseBodyForContentTypes, + PostMaxlengthValidationRequestBody, + PostMaxlengthValidationResponseBodyForContentTypes, + PostMaxproperties0MeansTheObjectIsEmptyRequestBody, + PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + PostMaxpropertiesValidationRequestBody, + PostMaxpropertiesValidationResponseBodyForContentTypes, + PostMinimumValidationRequestBody, + PostMinimumValidationResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerRequestBody, + PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + PostMinitemsValidationRequestBody, + PostMinitemsValidationResponseBodyForContentTypes, + PostMinlengthValidationRequestBody, + PostMinlengthValidationResponseBodyForContentTypes, + PostMinpropertiesValidationRequestBody, + PostMinpropertiesValidationResponseBodyForContentTypes, + PostNestedAllofToCheckValidationSemanticsRequestBody, + PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + PostNestedAnyofToCheckValidationSemanticsRequestBody, + PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + PostNestedItemsRequestBody, + PostNestedItemsResponseBodyForContentTypes, + PostNestedOneofToCheckValidationSemanticsRequestBody, + PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + PostNotMoreComplexSchemaRequestBody, + PostNotMoreComplexSchemaResponseBodyForContentTypes, + PostNotRequestBody, + PostNotResponseBodyForContentTypes, + PostNulCharactersInStringsRequestBody, + PostNulCharactersInStringsResponseBodyForContentTypes, + PostNullTypeMatchesOnlyTheNullObjectRequestBody, + PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersRequestBody, + PostNumberTypeMatchesNumbersResponseBodyForContentTypes, + PostObjectPropertiesValidationRequestBody, + PostObjectPropertiesValidationResponseBodyForContentTypes, + PostObjectTypeMatchesObjectsRequestBody, + PostObjectTypeMatchesObjectsResponseBodyForContentTypes, + PostOneofComplexTypesRequestBody, + PostOneofComplexTypesResponseBodyForContentTypes, + PostOneofRequestBody, + PostOneofResponseBodyForContentTypes, + PostOneofWithBaseSchemaRequestBody, + PostOneofWithBaseSchemaResponseBodyForContentTypes, + PostOneofWithEmptySchemaRequestBody, + PostOneofWithEmptySchemaResponseBodyForContentTypes, + PostPatternIsNotAnchoredRequestBody, + PostPatternIsNotAnchoredResponseBodyForContentTypes, + PostPatternValidationRequestBody, + PostPatternValidationResponseBodyForContentTypes, + PostPropertiesWithEscapedCharactersRequestBody, + PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, + PostPropertyNamedRefThatIsNotAReferenceRequestBody, + PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + PostRefInAdditionalpropertiesRequestBody, + PostRefInAdditionalpropertiesResponseBodyForContentTypes, + PostRefInAllofRequestBody, + PostRefInAllofResponseBodyForContentTypes, + PostRefInAnyofRequestBody, + PostRefInAnyofResponseBodyForContentTypes, + PostRefInItemsRequestBody, + PostRefInItemsResponseBodyForContentTypes, + PostRefInOneofRequestBody, + PostRefInOneofResponseBodyForContentTypes, + PostRefInPropertyRequestBody, + PostRefInPropertyResponseBodyForContentTypes, + PostRequiredDefaultValidationRequestBody, + PostRequiredDefaultValidationResponseBodyForContentTypes, + PostRequiredValidationRequestBody, + PostRequiredValidationResponseBodyForContentTypes, + PostRequiredWithEmptyArrayRequestBody, + PostRequiredWithEmptyArrayResponseBodyForContentTypes, + PostSimpleEnumValidationRequestBody, + PostSimpleEnumValidationResponseBodyForContentTypes, + PostStringTypeMatchesStringsRequestBody, + PostStringTypeMatchesStringsResponseBodyForContentTypes, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, + PostUniqueitemsFalseValidationRequestBody, + PostUniqueitemsFalseValidationResponseBodyForContentTypes, + PostUniqueitemsValidationRequestBody, + PostUniqueitemsValidationResponseBodyForContentTypes, + PostUriFormatRequestBody, + PostUriFormatResponseBodyForContentTypes, + PostUriReferenceFormatRequestBody, + PostUriReferenceFormatResponseBodyForContentTypes, + PostUriTemplateFormatRequestBody, + PostUriTemplateFormatResponseBodyForContentTypes, + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/__init__.py similarity index 71% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/__init__.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/__init__.py index 01b747df437..b551e07f303 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/__init__.py @@ -1,3 +1,3 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.api.post_api import PostApi +# from unit_test_api.api.content_type_json_api import ContentTypeJsonApi diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py new file mode 100644 index 00000000000..ab017b0d652 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate + +_path = '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py new file mode 100644 index 00000000000..ac4cd377ed4 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault + +_path = '/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py new file mode 100644 index 00000000000..fc824349edf --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself + +_path = '/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesCanExistByItself + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py new file mode 100644 index 00000000000..64e4e37953b --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators + +_path = '/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_combined_with_anyof_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_combined_with_anyof_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..b38b23f6114 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_combined_with_anyof_oneof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof + +_path = '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofCombinedWithAnyofOneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(api_client.Api): + + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_response_body_for_content_types.py new file mode 100644 index 00000000000..e6fab76d9c8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof import Allof + +_path = '/responseBody/postAllofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Allof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofResponseBodyForContentTypes(api_client.Api): + + def post_allof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_simple_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_simple_types_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_simple_types_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_simple_types_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_simple_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_simple_types_response_body_for_content_types.py new file mode 100644 index 00000000000..cf0c42d6060 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_simple_types_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_simple_types import AllofSimpleTypes + +_path = '/responseBody/postAllofSimpleTypesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofSimpleTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofSimpleTypesResponseBodyForContentTypes(api_client.Api): + + def post_allof_simple_types_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_base_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_with_base_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_base_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..1b770152f0a --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema + +_path = '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithBaseSchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_base_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_with_one_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_one_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_with_one_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_one_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_one_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_one_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..f71a310db3d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_one_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema + +_path = '/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithOneEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_one_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_the_first_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_the_first_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..000e53c4352 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_the_first_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema + +_path = '/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithTheFirstEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_the_last_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_the_last_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..86425e2d6a0 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_the_last_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema + +_path = '/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithTheLastEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_with_two_empty_schemas_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_two_empty_schemas_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_allof_with_two_empty_schemas_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_two_empty_schemas_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_two_empty_schemas_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_two_empty_schemas_response_body_for_content_types.py new file mode 100644 index 00000000000..a5acdf4667d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_allof_with_two_empty_schemas_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas + +_path = '/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithTwoEmptySchemas + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_anyof_complex_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_complex_types_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_anyof_complex_types_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_complex_types_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_complex_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_complex_types_response_body_for_content_types.py new file mode 100644 index 00000000000..524e692928e --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_complex_types_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof_complex_types import AnyofComplexTypes + +_path = '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyofComplexTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofComplexTypesResponseBodyForContentTypes(api_client.Api): + + def post_anyof_complex_types_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_anyof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_anyof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_response_body_for_content_types.py new file mode 100644 index 00000000000..3a437519277 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof import Anyof + +_path = '/responseBody/postAnyofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Anyof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofResponseBodyForContentTypes(api_client.Api): + + def post_anyof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_anyof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_with_base_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_anyof_with_base_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_with_base_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..e3910586ca6 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema + +_path = '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofWithBaseSchemaResponseBodyForContentTypes(api_client.Api): + + def post_anyof_with_base_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_anyof_with_one_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_with_one_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_anyof_with_one_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_with_one_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_with_one_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_with_one_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..8542cc54720 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_anyof_with_one_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema + +_path = '/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyofWithOneEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_array_type_matches_arrays_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_array_type_matches_arrays_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_array_type_matches_arrays_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_array_type_matches_arrays_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_array_type_matches_arrays_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_array_type_matches_arrays_response_body_for_content_types.py new file mode 100644 index 00000000000..d7900d4e7ec --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_array_type_matches_arrays_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays + +_path = '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ArrayTypeMatchesArrays + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostArrayTypeMatchesArraysResponseBodyForContentTypes(api_client.Api): + + def post_array_type_matches_arrays_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_boolean_type_matches_booleans_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_boolean_type_matches_booleans_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_boolean_type_matches_booleans_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_boolean_type_matches_booleans_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_boolean_type_matches_booleans_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_boolean_type_matches_booleans_response_body_for_content_types.py new file mode 100644 index 00000000000..c54378bd3f9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_boolean_type_matches_booleans_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = BoolSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(api_client.Api): + + def post_boolean_type_matches_booleans_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_by_int_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_int_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_by_int_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_int_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_int_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_int_response_body_for_content_types.py new file mode 100644 index 00000000000..af450aa23c5 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_int_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.by_int import ByInt + +_path = '/responseBody/postByIntResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ByInt + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostByIntResponseBodyForContentTypes(api_client.Api): + + def post_by_int_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_by_number_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_number_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_by_number_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_number_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_number_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_number_response_body_for_content_types.py new file mode 100644 index 00000000000..3e4d84b48ca --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_number_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.by_number import ByNumber + +_path = '/responseBody/postByNumberResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ByNumber + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostByNumberResponseBodyForContentTypes(api_client.Api): + + def post_by_number_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_by_small_number_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_small_number_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_by_small_number_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_small_number_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_small_number_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_small_number_response_body_for_content_types.py new file mode 100644 index 00000000000..b40379e0c7c --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_by_small_number_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.by_small_number import BySmallNumber + +_path = '/responseBody/postBySmallNumberResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = BySmallNumber + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostBySmallNumberResponseBodyForContentTypes(api_client.Api): + + def post_by_small_number_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_date_time_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_date_time_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_date_time_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_date_time_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_date_time_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_date_time_format_response_body_for_content_types.py new file mode 100644 index 00000000000..79b393d8bc8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_date_time_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postDateTimeFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostDateTimeFormatResponseBodyForContentTypes(api_client.Api): + + def post_date_time_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_email_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_email_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_email_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_email_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_email_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_email_format_response_body_for_content_types.py new file mode 100644 index 00000000000..09084e7ab46 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_email_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postEmailFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEmailFormatResponseBodyForContentTypes(api_client.Api): + + def post_email_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enum_with0_does_not_match_false_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with0_does_not_match_false_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enum_with0_does_not_match_false_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with0_does_not_match_false_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with0_does_not_match_false_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with0_does_not_match_false_response_body_for_content_types.py new file mode 100644 index 00000000000..b9dde493de8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with0_does_not_match_false_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse + +_path = '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWith0DoesNotMatchFalse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(api_client.Api): + + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enum_with1_does_not_match_true_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with1_does_not_match_true_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enum_with1_does_not_match_true_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with1_does_not_match_true_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with1_does_not_match_true_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with1_does_not_match_true_response_body_for_content_types.py new file mode 100644 index 00000000000..55b932ce087 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with1_does_not_match_true_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue + +_path = '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWith1DoesNotMatchTrue + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(api_client.Api): + + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enum_with_escaped_characters_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_escaped_characters_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enum_with_escaped_characters_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_escaped_characters_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_escaped_characters_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..424c5c2f5ad --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters + +_path = '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWithEscapedCharacters + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWithEscapedCharactersResponseBodyForContentTypes(api_client.Api): + + def post_enum_with_escaped_characters_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enum_with_false_does_not_match0_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_false_does_not_match0_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enum_with_false_does_not_match0_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_false_does_not_match0_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_false_does_not_match0_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_false_does_not_match0_response_body_for_content_types.py new file mode 100644 index 00000000000..15fb2319430 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_false_does_not_match0_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 + +_path = '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWithFalseDoesNotMatch0 + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(api_client.Api): + + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enum_with_true_does_not_match1_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_true_does_not_match1_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enum_with_true_does_not_match1_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_true_does_not_match1_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_true_does_not_match1_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_true_does_not_match1_response_body_for_content_types.py new file mode 100644 index 00000000000..1cbfe9e6491 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enum_with_true_does_not_match1_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 + +_path = '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWithTrueDoesNotMatch1 + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(api_client.Api): + + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enums_in_properties_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enums_in_properties_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_enums_in_properties_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enums_in_properties_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enums_in_properties_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enums_in_properties_response_body_for_content_types.py new file mode 100644 index 00000000000..9c78ee93315 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_enums_in_properties_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enums_in_properties import EnumsInProperties + +_path = '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumsInProperties + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumsInPropertiesResponseBodyForContentTypes(api_client.Api): + + def post_enums_in_properties_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_forbidden_property_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_forbidden_property_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_forbidden_property_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_forbidden_property_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_forbidden_property_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_forbidden_property_response_body_for_content_types.py new file mode 100644 index 00000000000..5c8994344e9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_forbidden_property_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.forbidden_property import ForbiddenProperty + +_path = '/responseBody/postForbiddenPropertyResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ForbiddenProperty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostForbiddenPropertyResponseBodyForContentTypes(api_client.Api): + + def post_forbidden_property_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_hostname_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_hostname_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_hostname_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_hostname_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_hostname_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_hostname_format_response_body_for_content_types.py new file mode 100644 index 00000000000..613967dd80f --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_hostname_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postHostnameFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostHostnameFormatResponseBodyForContentTypes(api_client.Api): + + def post_hostname_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_integer_type_matches_integers_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_integer_type_matches_integers_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_integer_type_matches_integers_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_integer_type_matches_integers_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_integer_type_matches_integers_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_integer_type_matches_integers_response_body_for_content_types.py new file mode 100644 index 00000000000..241d3031249 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_integer_type_matches_integers_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = IntSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(api_client.Api): + + def post_integer_type_matches_integers_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py new file mode 100644 index 00000000000..395b1910ba0 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf + +_path = '/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(api_client.Api): + + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_invalid_string_value_for_default_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_invalid_string_value_for_default_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_invalid_string_value_for_default_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_invalid_string_value_for_default_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_invalid_string_value_for_default_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_invalid_string_value_for_default_response_body_for_content_types.py new file mode 100644 index 00000000000..05a4c20a636 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_invalid_string_value_for_default_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault + +_path = '/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = InvalidStringValueForDefault + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostInvalidStringValueForDefaultResponseBodyForContentTypes(api_client.Api): + + def post_invalid_string_value_for_default_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ipv4_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ipv4_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ipv4_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ipv4_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ipv4_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ipv4_format_response_body_for_content_types.py new file mode 100644 index 00000000000..232c3401f0e --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ipv4_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postIpv4FormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostIpv4FormatResponseBodyForContentTypes(api_client.Api): + + def post_ipv4_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ipv6_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ipv6_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ipv6_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ipv6_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ipv6_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ipv6_format_response_body_for_content_types.py new file mode 100644 index 00000000000..6bd0dad761d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ipv6_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postIpv6FormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostIpv6FormatResponseBodyForContentTypes(api_client.Api): + + def post_ipv6_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_json_pointer_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_json_pointer_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_json_pointer_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_json_pointer_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_json_pointer_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_json_pointer_format_response_body_for_content_types.py new file mode 100644 index 00000000000..7fd1aae9688 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_json_pointer_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postJsonPointerFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostJsonPointerFormatResponseBodyForContentTypes(api_client.Api): + + def post_json_pointer_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maximum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maximum_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maximum_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maximum_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maximum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maximum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..f5b5623fec2 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maximum_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maximum_validation import MaximumValidation + +_path = '/responseBody/postMaximumValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaximumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaximumValidationResponseBodyForContentTypes(api_client.Api): + + def post_maximum_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py new file mode 100644 index 00000000000..fb68bb8a628 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger + +_path = '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaximumValidationWithUnsignedInteger + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(api_client.Api): + + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maxitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxitems_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maxitems_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxitems_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..b62833b24c3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxitems_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxitems_validation import MaxitemsValidation + +_path = '/responseBody/postMaxitemsValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaxitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxitemsValidationResponseBodyForContentTypes(api_client.Api): + + def post_maxitems_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maxlength_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxlength_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maxlength_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxlength_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxlength_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxlength_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..298daefa6eb --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxlength_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxlength_validation import MaxlengthValidation + +_path = '/responseBody/postMaxlengthValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaxlengthValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxlengthValidationResponseBodyForContentTypes(api_client.Api): + + def post_maxlength_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py new file mode 100644 index 00000000000..2e3c2c2d635 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty + +_path = '/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(api_client.Api): + + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maxproperties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxproperties_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_maxproperties_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxproperties_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxproperties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxproperties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..8cc19a717b6 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_maxproperties_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation + +_path = '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaxpropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxpropertiesValidationResponseBodyForContentTypes(api_client.Api): + + def post_maxproperties_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_minimum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minimum_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_minimum_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minimum_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minimum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minimum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..3e3e1604290 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minimum_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minimum_validation import MinimumValidation + +_path = '/responseBody/postMinimumValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinimumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinimumValidationResponseBodyForContentTypes(api_client.Api): + + def post_minimum_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minimum_validation_with_signed_integer_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minimum_validation_with_signed_integer_response_body_for_content_types.py new file mode 100644 index 00000000000..eb81abca930 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minimum_validation_with_signed_integer_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger + +_path = '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinimumValidationWithSignedInteger + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(api_client.Api): + + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_minitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minitems_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_minitems_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minitems_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..d4f4d729d1a --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minitems_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minitems_validation import MinitemsValidation + +_path = '/responseBody/postMinitemsValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinitemsValidationResponseBodyForContentTypes(api_client.Api): + + def post_minitems_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_minlength_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minlength_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_minlength_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minlength_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minlength_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minlength_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..4fbc7018605 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minlength_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minlength_validation import MinlengthValidation + +_path = '/responseBody/postMinlengthValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinlengthValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinlengthValidationResponseBodyForContentTypes(api_client.Api): + + def post_minlength_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_minproperties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minproperties_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_minproperties_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minproperties_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minproperties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minproperties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..ab2363a111b --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_minproperties_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minproperties_validation import MinpropertiesValidation + +_path = '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinpropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinpropertiesValidationResponseBodyForContentTypes(api_client.Api): + + def post_minproperties_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..90eb860c703 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics + +_path = '/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedAllofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(api_client.Api): + + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..33652b7dd61 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics + +_path = '/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedAnyofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(api_client.Api): + + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_nested_items_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_items_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_nested_items_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_items_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_items_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_items_response_body_for_content_types.py new file mode 100644 index 00000000000..f3b3f0832f6 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_items_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_items import NestedItems + +_path = '/responseBody/postNestedItemsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedItems + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedItemsResponseBodyForContentTypes(api_client.Api): + + def post_nested_items_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..26f37231030 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics + +_path = '/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedOneofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(api_client.Api): + + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_not_more_complex_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_not_more_complex_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_not_more_complex_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_not_more_complex_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_not_more_complex_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_not_more_complex_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..605f7fc052e --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_not_more_complex_schema_response_body_for_content_types.py @@ -0,0 +1,204 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes' +_method = 'POST' + + +class SchemaFor200ResponseBodyApplicationJson( + ComposedSchema +): + + @classmethod + @property + @functools.cache + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + + + class NotSchema( + DictSchema + ): + foo = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + foo: typing.Union[foo, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'NotSchema': + return super().__new__( + cls, + *args, + foo=foo, + _configuration=_configuration, + **kwargs, + ) + return { + 'allOf': [ + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + 'not': + NotSchema + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNotMoreComplexSchemaResponseBodyForContentTypes(api_client.Api): + + def post_not_more_complex_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_not_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_not_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_not_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_not_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_not_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_not_response_body_for_content_types.py new file mode 100644 index 00000000000..0c9445d620b --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_not_response_body_for_content_types.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNotResponseBodyForContentTypes' +_method = 'POST' + + +class SchemaFor200ResponseBodyApplicationJson( + ComposedSchema +): + + @classmethod + @property + @functools.cache + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + NotSchema = IntSchema + return { + 'allOf': [ + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + 'not': + NotSchema + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNotResponseBodyForContentTypes(api_client.Api): + + def post_not_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_nul_characters_in_strings_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nul_characters_in_strings_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_nul_characters_in_strings_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nul_characters_in_strings_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nul_characters_in_strings_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nul_characters_in_strings_response_body_for_content_types.py new file mode 100644 index 00000000000..e5226d0af3d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_nul_characters_in_strings_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings + +_path = '/responseBody/postNulCharactersInStringsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NulCharactersInStrings + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNulCharactersInStringsResponseBodyForContentTypes(api_client.Api): + + def post_nul_characters_in_strings_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_null_type_matches_only_the_null_object_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_null_type_matches_only_the_null_object_response_body_for_content_types.py new file mode 100644 index 00000000000..fa3e9b6abaa --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_null_type_matches_only_the_null_object_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NoneSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(api_client.Api): + + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_number_type_matches_numbers_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_number_type_matches_numbers_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_number_type_matches_numbers_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_number_type_matches_numbers_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_number_type_matches_numbers_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_number_type_matches_numbers_response_body_for_content_types.py new file mode 100644 index 00000000000..13d229bfe4d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_number_type_matches_numbers_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NumberSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(api_client.Api): + + def post_number_type_matches_numbers_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_object_properties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_object_properties_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_object_properties_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_object_properties_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_object_properties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_object_properties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..71ca4bece54 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_object_properties_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation + +_path = '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ObjectPropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostObjectPropertiesValidationResponseBodyForContentTypes(api_client.Api): + + def post_object_properties_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_object_type_matches_objects_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_object_type_matches_objects_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_object_type_matches_objects_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_object_type_matches_objects_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_object_type_matches_objects_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_object_type_matches_objects_response_body_for_content_types.py new file mode 100644 index 00000000000..fe8e08990ff --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_object_type_matches_objects_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = DictSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(api_client.Api): + + def post_object_type_matches_objects_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_oneof_complex_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_complex_types_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_oneof_complex_types_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_complex_types_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_complex_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_complex_types_response_body_for_content_types.py new file mode 100644 index 00000000000..189d0ead7c8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_complex_types_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof_complex_types import OneofComplexTypes + +_path = '/responseBody/postOneofComplexTypesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = OneofComplexTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofComplexTypesResponseBodyForContentTypes(api_client.Api): + + def post_oneof_complex_types_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_oneof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..5feccf681dd --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof import Oneof + +_path = '/responseBody/postOneofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Oneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofResponseBodyForContentTypes(api_client.Api): + + def post_oneof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_oneof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_with_base_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_oneof_with_base_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_with_base_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..e590f083d97 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema + +_path = '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = OneofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofWithBaseSchemaResponseBodyForContentTypes(api_client.Api): + + def post_oneof_with_base_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_oneof_with_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_with_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_oneof_with_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_with_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_with_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_with_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..38801768127 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_oneof_with_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema + +_path = '/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = OneofWithEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofWithEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_oneof_with_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_pattern_is_not_anchored_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_pattern_is_not_anchored_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_pattern_is_not_anchored_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_pattern_is_not_anchored_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_pattern_is_not_anchored_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_pattern_is_not_anchored_response_body_for_content_types.py new file mode 100644 index 00000000000..4d785c183b8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_pattern_is_not_anchored_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored + +_path = '/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PatternIsNotAnchored + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPatternIsNotAnchoredResponseBodyForContentTypes(api_client.Api): + + def post_pattern_is_not_anchored_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_pattern_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_pattern_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_pattern_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_pattern_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_pattern_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_pattern_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..a3a4d168eb8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_pattern_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.pattern_validation import PatternValidation + +_path = '/responseBody/postPatternValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PatternValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPatternValidationResponseBodyForContentTypes(api_client.Api): + + def post_pattern_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_properties_with_escaped_characters_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_properties_with_escaped_characters_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_properties_with_escaped_characters_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_properties_with_escaped_characters_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_properties_with_escaped_characters_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_properties_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..56240f68900 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_properties_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters + +_path = '/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PropertiesWithEscapedCharacters + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(api_client.Api): + + def post_properties_with_escaped_characters_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py new file mode 100644 index 00000000000..7d509abfdfe --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference + +_path = '/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PropertyNamedRefThatIsNotAReference + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(api_client.Api): + + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_additionalproperties_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_additionalproperties_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_additionalproperties_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_additionalproperties_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_additionalproperties_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_additionalproperties_response_body_for_content_types.py new file mode 100644 index 00000000000..2639708b354 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_additionalproperties_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties + +_path = '/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInAdditionalproperties + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInAdditionalpropertiesResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_additionalproperties_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_allof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_allof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_allof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_allof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_allof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_allof_response_body_for_content_types.py new file mode 100644 index 00000000000..d9aecd474e4 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_allof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_allof import RefInAllof + +_path = '/responseBody/postRefInAllofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInAllof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInAllofResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_allof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_anyof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_anyof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_anyof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_anyof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_anyof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_anyof_response_body_for_content_types.py new file mode 100644 index 00000000000..e259a9a51c9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_anyof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_anyof import RefInAnyof + +_path = '/responseBody/postRefInAnyofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInAnyof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInAnyofResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_anyof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_items_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_items_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_items_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_items_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_items_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_items_response_body_for_content_types.py new file mode 100644 index 00000000000..0d619752280 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_items_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_items import RefInItems + +_path = '/responseBody/postRefInItemsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInItems + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInItemsResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_items_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_oneof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_oneof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_oneof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..8061ee56220 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_oneof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_oneof import RefInOneof + +_path = '/responseBody/postRefInOneofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInOneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInOneofResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_oneof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_property_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_property_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_ref_in_property_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_property_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_property_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_property_response_body_for_content_types.py new file mode 100644 index 00000000000..137de85ac37 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_ref_in_property_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_property import RefInProperty + +_path = '/responseBody/postRefInPropertyResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInProperty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInPropertyResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_property_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_required_default_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_default_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_required_default_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_default_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_default_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_default_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..92697cb7a01 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_default_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.required_default_validation import RequiredDefaultValidation + +_path = '/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RequiredDefaultValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRequiredDefaultValidationResponseBodyForContentTypes(api_client.Api): + + def post_required_default_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_required_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_required_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..05b8971f8d9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.required_validation import RequiredValidation + +_path = '/responseBody/postRequiredValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RequiredValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRequiredValidationResponseBodyForContentTypes(api_client.Api): + + def post_required_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_required_with_empty_array_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_with_empty_array_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_required_with_empty_array_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_with_empty_array_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_with_empty_array_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_with_empty_array_response_body_for_content_types.py new file mode 100644 index 00000000000..6c8cb2775b2 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_required_with_empty_array_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray + +_path = '/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RequiredWithEmptyArray + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRequiredWithEmptyArrayResponseBodyForContentTypes(api_client.Api): + + def post_required_with_empty_array_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_simple_enum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_simple_enum_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_simple_enum_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_simple_enum_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_simple_enum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_simple_enum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..261f620249c --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_simple_enum_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.simple_enum_validation import SimpleEnumValidation + +_path = '/responseBody/postSimpleEnumValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = SimpleEnumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostSimpleEnumValidationResponseBodyForContentTypes(api_client.Api): + + def post_simple_enum_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_string_type_matches_strings_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_string_type_matches_strings_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_string_type_matches_strings_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_string_type_matches_strings_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_string_type_matches_strings_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_string_type_matches_strings_response_body_for_content_types.py new file mode 100644 index 00000000000..6625a4db867 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_string_type_matches_strings_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = StrSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostStringTypeMatchesStringsResponseBodyForContentTypes(api_client.Api): + + def post_string_type_matches_strings_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py new file mode 100644 index 00000000000..8909c59b712 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing + +_path = '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(api_client.Api): + + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_uniqueitems_false_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uniqueitems_false_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_uniqueitems_false_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uniqueitems_false_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uniqueitems_false_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uniqueitems_false_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..427b8787740 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uniqueitems_false_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation + +_path = '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = UniqueitemsFalseValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUniqueitemsFalseValidationResponseBodyForContentTypes(api_client.Api): + + def post_uniqueitems_false_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_uniqueitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uniqueitems_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_uniqueitems_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uniqueitems_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uniqueitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uniqueitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..937ad878ce9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uniqueitems_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation + +_path = '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = UniqueitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUniqueitemsValidationResponseBodyForContentTypes(api_client.Api): + + def post_uniqueitems_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_uri_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_uri_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_format_response_body_for_content_types.py new file mode 100644 index 00000000000..9b2e9b27c5f --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postUriFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUriFormatResponseBodyForContentTypes(api_client.Api): + + def post_uri_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_uri_reference_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_reference_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_uri_reference_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_reference_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_reference_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_reference_format_response_body_for_content_types.py new file mode 100644 index 00000000000..8dc0f82ca0f --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_reference_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postUriReferenceFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUriReferenceFormatResponseBodyForContentTypes(api_client.Api): + + def post_uri_reference_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_uri_template_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_template_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/post_uri_template_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_template_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_template_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_template_format_response_body_for_content_types.py new file mode 100644 index 00000000000..155d57fdb34 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/content_type_json_api_endpoints/post_uri_template_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postUriTemplateFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUriTemplateFormatResponseBodyForContentTypes(api_client.Api): + + def post_uri_template_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api.py deleted file mode 100644 index dfe85899ef3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api.py +++ /dev/null @@ -1,191 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.api_client import ApiClient -from unit_test_api.api.json_api_endpoints.post_additionalproperties_allows_a_schema_which_should_validate_request_body import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from unit_test_api.api.json_api_endpoints.post_additionalproperties_are_allowed_by_default_request_body import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from unit_test_api.api.json_api_endpoints.post_additionalproperties_can_exist_by_itself_request_body import PostAdditionalpropertiesCanExistByItselfRequestBody -from unit_test_api.api.json_api_endpoints.post_additionalproperties_should_not_look_in_applicators_request_body import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from unit_test_api.api.json_api_endpoints.post_allof_combined_with_anyof_oneof_request_body import PostAllofCombinedWithAnyofOneofRequestBody -from unit_test_api.api.json_api_endpoints.post_allof_request_body import PostAllofRequestBody -from unit_test_api.api.json_api_endpoints.post_allof_simple_types_request_body import PostAllofSimpleTypesRequestBody -from unit_test_api.api.json_api_endpoints.post_allof_with_base_schema_request_body import PostAllofWithBaseSchemaRequestBody -from unit_test_api.api.json_api_endpoints.post_allof_with_one_empty_schema_request_body import PostAllofWithOneEmptySchemaRequestBody -from unit_test_api.api.json_api_endpoints.post_allof_with_the_first_empty_schema_request_body import PostAllofWithTheFirstEmptySchemaRequestBody -from unit_test_api.api.json_api_endpoints.post_allof_with_the_last_empty_schema_request_body import PostAllofWithTheLastEmptySchemaRequestBody -from unit_test_api.api.json_api_endpoints.post_allof_with_two_empty_schemas_request_body import PostAllofWithTwoEmptySchemasRequestBody -from unit_test_api.api.json_api_endpoints.post_anyof_complex_types_request_body import PostAnyofComplexTypesRequestBody -from unit_test_api.api.json_api_endpoints.post_anyof_request_body import PostAnyofRequestBody -from unit_test_api.api.json_api_endpoints.post_anyof_with_base_schema_request_body import PostAnyofWithBaseSchemaRequestBody -from unit_test_api.api.json_api_endpoints.post_anyof_with_one_empty_schema_request_body import PostAnyofWithOneEmptySchemaRequestBody -from unit_test_api.api.json_api_endpoints.post_array_type_matches_arrays_request_body import PostArrayTypeMatchesArraysRequestBody -from unit_test_api.api.json_api_endpoints.post_boolean_type_matches_booleans_request_body import PostBooleanTypeMatchesBooleansRequestBody -from unit_test_api.api.json_api_endpoints.post_by_int_request_body import PostByIntRequestBody -from unit_test_api.api.json_api_endpoints.post_by_number_request_body import PostByNumberRequestBody -from unit_test_api.api.json_api_endpoints.post_by_small_number_request_body import PostBySmallNumberRequestBody -from unit_test_api.api.json_api_endpoints.post_date_time_format_request_body import PostDateTimeFormatRequestBody -from unit_test_api.api.json_api_endpoints.post_email_format_request_body import PostEmailFormatRequestBody -from unit_test_api.api.json_api_endpoints.post_enum_with0_does_not_match_false_request_body import PostEnumWith0DoesNotMatchFalseRequestBody -from unit_test_api.api.json_api_endpoints.post_enum_with1_does_not_match_true_request_body import PostEnumWith1DoesNotMatchTrueRequestBody -from unit_test_api.api.json_api_endpoints.post_enum_with_escaped_characters_request_body import PostEnumWithEscapedCharactersRequestBody -from unit_test_api.api.json_api_endpoints.post_enum_with_false_does_not_match0_request_body import PostEnumWithFalseDoesNotMatch0RequestBody -from unit_test_api.api.json_api_endpoints.post_enum_with_true_does_not_match1_request_body import PostEnumWithTrueDoesNotMatch1RequestBody -from unit_test_api.api.json_api_endpoints.post_enums_in_properties_request_body import PostEnumsInPropertiesRequestBody -from unit_test_api.api.json_api_endpoints.post_forbidden_property_request_body import PostForbiddenPropertyRequestBody -from unit_test_api.api.json_api_endpoints.post_hostname_format_request_body import PostHostnameFormatRequestBody -from unit_test_api.api.json_api_endpoints.post_integer_type_matches_integers_request_body import PostIntegerTypeMatchesIntegersRequestBody -from unit_test_api.api.json_api_endpoints.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from unit_test_api.api.json_api_endpoints.post_invalid_string_value_for_default_request_body import PostInvalidStringValueForDefaultRequestBody -from unit_test_api.api.json_api_endpoints.post_ipv4_format_request_body import PostIpv4FormatRequestBody -from unit_test_api.api.json_api_endpoints.post_ipv6_format_request_body import PostIpv6FormatRequestBody -from unit_test_api.api.json_api_endpoints.post_json_pointer_format_request_body import PostJsonPointerFormatRequestBody -from unit_test_api.api.json_api_endpoints.post_maximum_validation_request_body import PostMaximumValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_maximum_validation_with_unsigned_integer_request_body import PostMaximumValidationWithUnsignedIntegerRequestBody -from unit_test_api.api.json_api_endpoints.post_maxitems_validation_request_body import PostMaxitemsValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_maxlength_validation_request_body import PostMaxlengthValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_maxproperties0_means_the_object_is_empty_request_body import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from unit_test_api.api.json_api_endpoints.post_maxproperties_validation_request_body import PostMaxpropertiesValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_minimum_validation_request_body import PostMinimumValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_minimum_validation_with_signed_integer_request_body import PostMinimumValidationWithSignedIntegerRequestBody -from unit_test_api.api.json_api_endpoints.post_minitems_validation_request_body import PostMinitemsValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_minlength_validation_request_body import PostMinlengthValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_minproperties_validation_request_body import PostMinpropertiesValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_nested_allof_to_check_validation_semantics_request_body import PostNestedAllofToCheckValidationSemanticsRequestBody -from unit_test_api.api.json_api_endpoints.post_nested_anyof_to_check_validation_semantics_request_body import PostNestedAnyofToCheckValidationSemanticsRequestBody -from unit_test_api.api.json_api_endpoints.post_nested_items_request_body import PostNestedItemsRequestBody -from unit_test_api.api.json_api_endpoints.post_nested_oneof_to_check_validation_semantics_request_body import PostNestedOneofToCheckValidationSemanticsRequestBody -from unit_test_api.api.json_api_endpoints.post_not_more_complex_schema_request_body import PostNotMoreComplexSchemaRequestBody -from unit_test_api.api.json_api_endpoints.post_not_request_body import PostNotRequestBody -from unit_test_api.api.json_api_endpoints.post_nul_characters_in_strings_request_body import PostNulCharactersInStringsRequestBody -from unit_test_api.api.json_api_endpoints.post_null_type_matches_only_the_null_object_request_body import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from unit_test_api.api.json_api_endpoints.post_number_type_matches_numbers_request_body import PostNumberTypeMatchesNumbersRequestBody -from unit_test_api.api.json_api_endpoints.post_object_properties_validation_request_body import PostObjectPropertiesValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_object_type_matches_objects_request_body import PostObjectTypeMatchesObjectsRequestBody -from unit_test_api.api.json_api_endpoints.post_oneof_complex_types_request_body import PostOneofComplexTypesRequestBody -from unit_test_api.api.json_api_endpoints.post_oneof_request_body import PostOneofRequestBody -from unit_test_api.api.json_api_endpoints.post_oneof_with_base_schema_request_body import PostOneofWithBaseSchemaRequestBody -from unit_test_api.api.json_api_endpoints.post_oneof_with_empty_schema_request_body import PostOneofWithEmptySchemaRequestBody -from unit_test_api.api.json_api_endpoints.post_pattern_is_not_anchored_request_body import PostPatternIsNotAnchoredRequestBody -from unit_test_api.api.json_api_endpoints.post_pattern_validation_request_body import PostPatternValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_properties_with_escaped_characters_request_body import PostPropertiesWithEscapedCharactersRequestBody -from unit_test_api.api.json_api_endpoints.post_property_named_ref_that_is_not_a_reference_request_body import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from unit_test_api.api.json_api_endpoints.post_ref_in_additionalproperties_request_body import PostRefInAdditionalpropertiesRequestBody -from unit_test_api.api.json_api_endpoints.post_ref_in_allof_request_body import PostRefInAllofRequestBody -from unit_test_api.api.json_api_endpoints.post_ref_in_anyof_request_body import PostRefInAnyofRequestBody -from unit_test_api.api.json_api_endpoints.post_ref_in_items_request_body import PostRefInItemsRequestBody -from unit_test_api.api.json_api_endpoints.post_ref_in_oneof_request_body import PostRefInOneofRequestBody -from unit_test_api.api.json_api_endpoints.post_ref_in_property_request_body import PostRefInPropertyRequestBody -from unit_test_api.api.json_api_endpoints.post_required_default_validation_request_body import PostRequiredDefaultValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_required_validation_request_body import PostRequiredValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_required_with_empty_array_request_body import PostRequiredWithEmptyArrayRequestBody -from unit_test_api.api.json_api_endpoints.post_simple_enum_validation_request_body import PostSimpleEnumValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_string_type_matches_strings_request_body import PostStringTypeMatchesStringsRequestBody -from unit_test_api.api.json_api_endpoints.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from unit_test_api.api.json_api_endpoints.post_uniqueitems_false_validation_request_body import PostUniqueitemsFalseValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_uniqueitems_validation_request_body import PostUniqueitemsValidationRequestBody -from unit_test_api.api.json_api_endpoints.post_uri_format_request_body import PostUriFormatRequestBody -from unit_test_api.api.json_api_endpoints.post_uri_reference_format_request_body import PostUriReferenceFormatRequestBody -from unit_test_api.api.json_api_endpoints.post_uri_template_format_request_body import PostUriTemplateFormatRequestBody - - -class JsonApi( - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PostAllofCombinedWithAnyofOneofRequestBody, - PostAllofRequestBody, - PostAllofSimpleTypesRequestBody, - PostAllofWithBaseSchemaRequestBody, - PostAllofWithOneEmptySchemaRequestBody, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostAllofWithTheLastEmptySchemaRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostAnyofComplexTypesRequestBody, - PostAnyofRequestBody, - PostAnyofWithBaseSchemaRequestBody, - PostAnyofWithOneEmptySchemaRequestBody, - PostArrayTypeMatchesArraysRequestBody, - PostBooleanTypeMatchesBooleansRequestBody, - PostByIntRequestBody, - PostByNumberRequestBody, - PostBySmallNumberRequestBody, - PostDateTimeFormatRequestBody, - PostEmailFormatRequestBody, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostEnumsInPropertiesRequestBody, - PostForbiddenPropertyRequestBody, - PostHostnameFormatRequestBody, - PostIntegerTypeMatchesIntegersRequestBody, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PostInvalidStringValueForDefaultRequestBody, - PostIpv4FormatRequestBody, - PostIpv6FormatRequestBody, - PostJsonPointerFormatRequestBody, - PostMaximumValidationRequestBody, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostMaxitemsValidationRequestBody, - PostMaxlengthValidationRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostMaxpropertiesValidationRequestBody, - PostMinimumValidationRequestBody, - PostMinimumValidationWithSignedIntegerRequestBody, - PostMinitemsValidationRequestBody, - PostMinlengthValidationRequestBody, - PostMinpropertiesValidationRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostNestedItemsRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostNotMoreComplexSchemaRequestBody, - PostNotRequestBody, - PostNulCharactersInStringsRequestBody, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostNumberTypeMatchesNumbersRequestBody, - PostObjectPropertiesValidationRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostOneofComplexTypesRequestBody, - PostOneofRequestBody, - PostOneofWithBaseSchemaRequestBody, - PostOneofWithEmptySchemaRequestBody, - PostPatternIsNotAnchoredRequestBody, - PostPatternValidationRequestBody, - PostPropertiesWithEscapedCharactersRequestBody, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostRefInAdditionalpropertiesRequestBody, - PostRefInAllofRequestBody, - PostRefInAnyofRequestBody, - PostRefInItemsRequestBody, - PostRefInOneofRequestBody, - PostRefInPropertyRequestBody, - PostRequiredDefaultValidationRequestBody, - PostRequiredValidationRequestBody, - PostRequiredWithEmptyArrayRequestBody, - PostSimpleEnumValidationRequestBody, - PostStringTypeMatchesStringsRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PostUniqueitemsFalseValidationRequestBody, - PostUniqueitemsValidationRequestBody, - PostUriFormatRequestBody, - PostUriReferenceFormatRequestBody, - PostUriTemplateFormatRequestBody, - ApiClient, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api.py new file mode 100644 index 00000000000..49e830a794c --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + + The version of the OpenAPI document: 0.0.1 + Generated by: https://openapi-generator.tech +""" + +from unit_test_api.api_client import ApiClient +from unit_test_api.api.operation_request_body_api_endpoints.post_additionalproperties_allows_a_schema_which_should_validate_request_body import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_additionalproperties_are_allowed_by_default_request_body import PostAdditionalpropertiesAreAllowedByDefaultRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_additionalproperties_can_exist_by_itself_request_body import PostAdditionalpropertiesCanExistByItselfRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_additionalproperties_should_not_look_in_applicators_request_body import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_allof_combined_with_anyof_oneof_request_body import PostAllofCombinedWithAnyofOneofRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_allof_request_body import PostAllofRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_allof_simple_types_request_body import PostAllofSimpleTypesRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_allof_with_base_schema_request_body import PostAllofWithBaseSchemaRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_allof_with_one_empty_schema_request_body import PostAllofWithOneEmptySchemaRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_allof_with_the_first_empty_schema_request_body import PostAllofWithTheFirstEmptySchemaRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_allof_with_the_last_empty_schema_request_body import PostAllofWithTheLastEmptySchemaRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_allof_with_two_empty_schemas_request_body import PostAllofWithTwoEmptySchemasRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_anyof_complex_types_request_body import PostAnyofComplexTypesRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_anyof_request_body import PostAnyofRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_anyof_with_base_schema_request_body import PostAnyofWithBaseSchemaRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_anyof_with_one_empty_schema_request_body import PostAnyofWithOneEmptySchemaRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_array_type_matches_arrays_request_body import PostArrayTypeMatchesArraysRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_boolean_type_matches_booleans_request_body import PostBooleanTypeMatchesBooleansRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_by_int_request_body import PostByIntRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_by_number_request_body import PostByNumberRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_by_small_number_request_body import PostBySmallNumberRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_date_time_format_request_body import PostDateTimeFormatRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_email_format_request_body import PostEmailFormatRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_enum_with0_does_not_match_false_request_body import PostEnumWith0DoesNotMatchFalseRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_enum_with1_does_not_match_true_request_body import PostEnumWith1DoesNotMatchTrueRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_enum_with_escaped_characters_request_body import PostEnumWithEscapedCharactersRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_enum_with_false_does_not_match0_request_body import PostEnumWithFalseDoesNotMatch0RequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_enum_with_true_does_not_match1_request_body import PostEnumWithTrueDoesNotMatch1RequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_enums_in_properties_request_body import PostEnumsInPropertiesRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_forbidden_property_request_body import PostForbiddenPropertyRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_hostname_format_request_body import PostHostnameFormatRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_integer_type_matches_integers_request_body import PostIntegerTypeMatchesIntegersRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_invalid_string_value_for_default_request_body import PostInvalidStringValueForDefaultRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_ipv4_format_request_body import PostIpv4FormatRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_ipv6_format_request_body import PostIpv6FormatRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_json_pointer_format_request_body import PostJsonPointerFormatRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_maximum_validation_request_body import PostMaximumValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_maximum_validation_with_unsigned_integer_request_body import PostMaximumValidationWithUnsignedIntegerRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_maxitems_validation_request_body import PostMaxitemsValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_maxlength_validation_request_body import PostMaxlengthValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_maxproperties0_means_the_object_is_empty_request_body import PostMaxproperties0MeansTheObjectIsEmptyRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_maxproperties_validation_request_body import PostMaxpropertiesValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_minimum_validation_request_body import PostMinimumValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_minimum_validation_with_signed_integer_request_body import PostMinimumValidationWithSignedIntegerRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_minitems_validation_request_body import PostMinitemsValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_minlength_validation_request_body import PostMinlengthValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_minproperties_validation_request_body import PostMinpropertiesValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_nested_allof_to_check_validation_semantics_request_body import PostNestedAllofToCheckValidationSemanticsRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_nested_anyof_to_check_validation_semantics_request_body import PostNestedAnyofToCheckValidationSemanticsRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_nested_items_request_body import PostNestedItemsRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_nested_oneof_to_check_validation_semantics_request_body import PostNestedOneofToCheckValidationSemanticsRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_not_more_complex_schema_request_body import PostNotMoreComplexSchemaRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_not_request_body import PostNotRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_nul_characters_in_strings_request_body import PostNulCharactersInStringsRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_null_type_matches_only_the_null_object_request_body import PostNullTypeMatchesOnlyTheNullObjectRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_number_type_matches_numbers_request_body import PostNumberTypeMatchesNumbersRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_object_properties_validation_request_body import PostObjectPropertiesValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_object_type_matches_objects_request_body import PostObjectTypeMatchesObjectsRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_oneof_complex_types_request_body import PostOneofComplexTypesRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_oneof_request_body import PostOneofRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_oneof_with_base_schema_request_body import PostOneofWithBaseSchemaRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_oneof_with_empty_schema_request_body import PostOneofWithEmptySchemaRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_pattern_is_not_anchored_request_body import PostPatternIsNotAnchoredRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_pattern_validation_request_body import PostPatternValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_properties_with_escaped_characters_request_body import PostPropertiesWithEscapedCharactersRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_property_named_ref_that_is_not_a_reference_request_body import PostPropertyNamedRefThatIsNotAReferenceRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_ref_in_additionalproperties_request_body import PostRefInAdditionalpropertiesRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_ref_in_allof_request_body import PostRefInAllofRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_ref_in_anyof_request_body import PostRefInAnyofRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_ref_in_items_request_body import PostRefInItemsRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_ref_in_oneof_request_body import PostRefInOneofRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_ref_in_property_request_body import PostRefInPropertyRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_required_default_validation_request_body import PostRequiredDefaultValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_required_validation_request_body import PostRequiredValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_required_with_empty_array_request_body import PostRequiredWithEmptyArrayRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_simple_enum_validation_request_body import PostSimpleEnumValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_string_type_matches_strings_request_body import PostStringTypeMatchesStringsRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_uniqueitems_false_validation_request_body import PostUniqueitemsFalseValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_uniqueitems_validation_request_body import PostUniqueitemsValidationRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_uri_format_request_body import PostUriFormatRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_uri_reference_format_request_body import PostUriReferenceFormatRequestBody +from unit_test_api.api.operation_request_body_api_endpoints.post_uri_template_format_request_body import PostUriTemplateFormatRequestBody + + +class OperationRequestBodyApi( + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultRequestBody, + PostAdditionalpropertiesCanExistByItselfRequestBody, + PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, + PostAllofCombinedWithAnyofOneofRequestBody, + PostAllofRequestBody, + PostAllofSimpleTypesRequestBody, + PostAllofWithBaseSchemaRequestBody, + PostAllofWithOneEmptySchemaRequestBody, + PostAllofWithTheFirstEmptySchemaRequestBody, + PostAllofWithTheLastEmptySchemaRequestBody, + PostAllofWithTwoEmptySchemasRequestBody, + PostAnyofComplexTypesRequestBody, + PostAnyofRequestBody, + PostAnyofWithBaseSchemaRequestBody, + PostAnyofWithOneEmptySchemaRequestBody, + PostArrayTypeMatchesArraysRequestBody, + PostBooleanTypeMatchesBooleansRequestBody, + PostByIntRequestBody, + PostByNumberRequestBody, + PostBySmallNumberRequestBody, + PostDateTimeFormatRequestBody, + PostEmailFormatRequestBody, + PostEnumWith0DoesNotMatchFalseRequestBody, + PostEnumWith1DoesNotMatchTrueRequestBody, + PostEnumWithEscapedCharactersRequestBody, + PostEnumWithFalseDoesNotMatch0RequestBody, + PostEnumWithTrueDoesNotMatch1RequestBody, + PostEnumsInPropertiesRequestBody, + PostForbiddenPropertyRequestBody, + PostHostnameFormatRequestBody, + PostIntegerTypeMatchesIntegersRequestBody, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, + PostInvalidStringValueForDefaultRequestBody, + PostIpv4FormatRequestBody, + PostIpv6FormatRequestBody, + PostJsonPointerFormatRequestBody, + PostMaximumValidationRequestBody, + PostMaximumValidationWithUnsignedIntegerRequestBody, + PostMaxitemsValidationRequestBody, + PostMaxlengthValidationRequestBody, + PostMaxproperties0MeansTheObjectIsEmptyRequestBody, + PostMaxpropertiesValidationRequestBody, + PostMinimumValidationRequestBody, + PostMinimumValidationWithSignedIntegerRequestBody, + PostMinitemsValidationRequestBody, + PostMinlengthValidationRequestBody, + PostMinpropertiesValidationRequestBody, + PostNestedAllofToCheckValidationSemanticsRequestBody, + PostNestedAnyofToCheckValidationSemanticsRequestBody, + PostNestedItemsRequestBody, + PostNestedOneofToCheckValidationSemanticsRequestBody, + PostNotMoreComplexSchemaRequestBody, + PostNotRequestBody, + PostNulCharactersInStringsRequestBody, + PostNullTypeMatchesOnlyTheNullObjectRequestBody, + PostNumberTypeMatchesNumbersRequestBody, + PostObjectPropertiesValidationRequestBody, + PostObjectTypeMatchesObjectsRequestBody, + PostOneofComplexTypesRequestBody, + PostOneofRequestBody, + PostOneofWithBaseSchemaRequestBody, + PostOneofWithEmptySchemaRequestBody, + PostPatternIsNotAnchoredRequestBody, + PostPatternValidationRequestBody, + PostPropertiesWithEscapedCharactersRequestBody, + PostPropertyNamedRefThatIsNotAReferenceRequestBody, + PostRefInAdditionalpropertiesRequestBody, + PostRefInAllofRequestBody, + PostRefInAnyofRequestBody, + PostRefInItemsRequestBody, + PostRefInOneofRequestBody, + PostRefInPropertyRequestBody, + PostRequiredDefaultValidationRequestBody, + PostRequiredValidationRequestBody, + PostRequiredWithEmptyArrayRequestBody, + PostSimpleEnumValidationRequestBody, + PostStringTypeMatchesStringsRequestBody, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, + PostUniqueitemsFalseValidationRequestBody, + PostUniqueitemsValidationRequestBody, + PostUriFormatRequestBody, + PostUriReferenceFormatRequestBody, + PostUriTemplateFormatRequestBody, + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/__init__.py similarity index 68% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/__init__.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/__init__.py index 155bdf9976d..b8b5b9d5de2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/__init__.py @@ -1,3 +1,3 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.api.request_body_api import RequestBodyApi +# from unit_test_api.api.operation_request_body_api import OperationRequestBodyApi diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_simple_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_simple_types_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_simple_types_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_simple_types_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_with_base_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_with_base_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_with_base_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_with_one_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_with_one_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_with_one_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_with_one_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_with_two_empty_schemas_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_with_two_empty_schemas_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_allof_with_two_empty_schemas_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_allof_with_two_empty_schemas_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_anyof_complex_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_anyof_complex_types_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_anyof_complex_types_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_anyof_complex_types_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_anyof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_anyof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_anyof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_anyof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_anyof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_anyof_with_base_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_anyof_with_base_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_anyof_with_base_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_anyof_with_one_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_anyof_with_one_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_anyof_with_one_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_anyof_with_one_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_array_type_matches_arrays_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_array_type_matches_arrays_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_array_type_matches_arrays_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_array_type_matches_arrays_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_boolean_type_matches_booleans_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_boolean_type_matches_booleans_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_boolean_type_matches_booleans_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_boolean_type_matches_booleans_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_by_int_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_by_int_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_by_int_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_by_int_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_by_number_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_by_number_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_by_number_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_by_number_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_by_small_number_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_by_small_number_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_by_small_number_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_by_small_number_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_date_time_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_date_time_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_date_time_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_date_time_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_email_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_email_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_email_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_email_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enum_with0_does_not_match_false_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enum_with0_does_not_match_false_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enum_with0_does_not_match_false_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enum_with0_does_not_match_false_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enum_with1_does_not_match_true_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enum_with1_does_not_match_true_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enum_with1_does_not_match_true_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enum_with1_does_not_match_true_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enum_with_escaped_characters_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enum_with_escaped_characters_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enum_with_escaped_characters_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enum_with_escaped_characters_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enum_with_false_does_not_match0_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enum_with_false_does_not_match0_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enum_with_false_does_not_match0_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enum_with_false_does_not_match0_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enum_with_true_does_not_match1_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enum_with_true_does_not_match1_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enum_with_true_does_not_match1_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enum_with_true_does_not_match1_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enums_in_properties_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enums_in_properties_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_enums_in_properties_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_enums_in_properties_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_forbidden_property_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_forbidden_property_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_forbidden_property_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_forbidden_property_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_hostname_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_hostname_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_hostname_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_hostname_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_integer_type_matches_integers_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_integer_type_matches_integers_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_integer_type_matches_integers_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_integer_type_matches_integers_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_invalid_string_value_for_default_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_invalid_string_value_for_default_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_invalid_string_value_for_default_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_invalid_string_value_for_default_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ipv4_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ipv4_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ipv4_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ipv4_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ipv6_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ipv6_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ipv6_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ipv6_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_json_pointer_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_json_pointer_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_json_pointer_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_json_pointer_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maximum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maximum_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maximum_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maximum_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maxitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maxitems_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maxitems_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maxitems_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maxlength_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maxlength_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maxlength_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maxlength_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maxproperties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maxproperties_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_maxproperties_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_maxproperties_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_minimum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_minimum_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_minimum_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_minimum_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_minitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_minitems_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_minitems_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_minitems_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_minlength_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_minlength_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_minlength_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_minlength_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_minproperties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_minproperties_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_minproperties_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_minproperties_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_nested_items_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_nested_items_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_nested_items_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_nested_items_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_not_more_complex_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_not_more_complex_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_not_more_complex_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_not_more_complex_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_not_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_not_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_not_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_not_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_nul_characters_in_strings_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_nul_characters_in_strings_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_nul_characters_in_strings_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_nul_characters_in_strings_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_number_type_matches_numbers_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_number_type_matches_numbers_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_number_type_matches_numbers_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_number_type_matches_numbers_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_object_properties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_object_properties_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_object_properties_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_object_properties_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_object_type_matches_objects_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_object_type_matches_objects_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_object_type_matches_objects_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_object_type_matches_objects_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_oneof_complex_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_oneof_complex_types_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_oneof_complex_types_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_oneof_complex_types_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_oneof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_oneof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_oneof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_oneof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_oneof_with_base_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_oneof_with_base_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_oneof_with_base_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_oneof_with_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_oneof_with_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_oneof_with_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_oneof_with_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_pattern_is_not_anchored_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_pattern_is_not_anchored_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_pattern_is_not_anchored_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_pattern_is_not_anchored_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_pattern_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_pattern_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_pattern_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_pattern_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_properties_with_escaped_characters_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_properties_with_escaped_characters_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_properties_with_escaped_characters_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_properties_with_escaped_characters_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_additionalproperties_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_additionalproperties_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_additionalproperties_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_additionalproperties_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_allof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_allof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_allof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_allof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_anyof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_anyof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_anyof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_anyof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_items_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_items_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_items_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_items_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_oneof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_oneof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_oneof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_property_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_property_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_ref_in_property_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_ref_in_property_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_required_default_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_required_default_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_required_default_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_required_default_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_required_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_required_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_required_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_required_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_required_with_empty_array_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_required_with_empty_array_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_required_with_empty_array_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_required_with_empty_array_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_simple_enum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_simple_enum_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_simple_enum_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_simple_enum_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_string_type_matches_strings_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_string_type_matches_strings_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_string_type_matches_strings_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_string_type_matches_strings_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_uniqueitems_false_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_uniqueitems_false_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_uniqueitems_false_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_uniqueitems_false_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_uniqueitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_uniqueitems_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_uniqueitems_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_uniqueitems_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_uri_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_uri_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_uri_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_uri_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_uri_reference_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_uri_reference_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_uri_reference_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_uri_reference_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_uri_template_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_uri_template_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api_endpoints/post_uri_template_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/operation_request_body_api_endpoints/post_uri_template_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api.py new file mode 100644 index 00000000000..6febf2ddbe4 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api.py @@ -0,0 +1,359 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + + The version of the OpenAPI document: 0.0.1 + Generated by: https://openapi-generator.tech +""" + +from unit_test_api.api_client import ApiClient +from unit_test_api.api.path_post_api_endpoints.post_additionalproperties_allows_a_schema_which_should_validate_request_body import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody +from unit_test_api.api.path_post_api_endpoints.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_additionalproperties_are_allowed_by_default_request_body import PostAdditionalpropertiesAreAllowedByDefaultRequestBody +from unit_test_api.api.path_post_api_endpoints.post_additionalproperties_are_allowed_by_default_response_body_for_content_types import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_additionalproperties_can_exist_by_itself_request_body import PostAdditionalpropertiesCanExistByItselfRequestBody +from unit_test_api.api.path_post_api_endpoints.post_additionalproperties_can_exist_by_itself_response_body_for_content_types import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_additionalproperties_should_not_look_in_applicators_request_body import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody +from unit_test_api.api.path_post_api_endpoints.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_allof_combined_with_anyof_oneof_request_body import PostAllofCombinedWithAnyofOneofRequestBody +from unit_test_api.api.path_post_api_endpoints.post_allof_combined_with_anyof_oneof_response_body_for_content_types import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_allof_request_body import PostAllofRequestBody +from unit_test_api.api.path_post_api_endpoints.post_allof_response_body_for_content_types import PostAllofResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_allof_simple_types_request_body import PostAllofSimpleTypesRequestBody +from unit_test_api.api.path_post_api_endpoints.post_allof_simple_types_response_body_for_content_types import PostAllofSimpleTypesResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_allof_with_base_schema_request_body import PostAllofWithBaseSchemaRequestBody +from unit_test_api.api.path_post_api_endpoints.post_allof_with_base_schema_response_body_for_content_types import PostAllofWithBaseSchemaResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_allof_with_one_empty_schema_request_body import PostAllofWithOneEmptySchemaRequestBody +from unit_test_api.api.path_post_api_endpoints.post_allof_with_one_empty_schema_response_body_for_content_types import PostAllofWithOneEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_allof_with_the_first_empty_schema_request_body import PostAllofWithTheFirstEmptySchemaRequestBody +from unit_test_api.api.path_post_api_endpoints.post_allof_with_the_first_empty_schema_response_body_for_content_types import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_allof_with_the_last_empty_schema_request_body import PostAllofWithTheLastEmptySchemaRequestBody +from unit_test_api.api.path_post_api_endpoints.post_allof_with_the_last_empty_schema_response_body_for_content_types import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_allof_with_two_empty_schemas_request_body import PostAllofWithTwoEmptySchemasRequestBody +from unit_test_api.api.path_post_api_endpoints.post_allof_with_two_empty_schemas_response_body_for_content_types import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_anyof_complex_types_request_body import PostAnyofComplexTypesRequestBody +from unit_test_api.api.path_post_api_endpoints.post_anyof_complex_types_response_body_for_content_types import PostAnyofComplexTypesResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_anyof_request_body import PostAnyofRequestBody +from unit_test_api.api.path_post_api_endpoints.post_anyof_response_body_for_content_types import PostAnyofResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_anyof_with_base_schema_request_body import PostAnyofWithBaseSchemaRequestBody +from unit_test_api.api.path_post_api_endpoints.post_anyof_with_base_schema_response_body_for_content_types import PostAnyofWithBaseSchemaResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_anyof_with_one_empty_schema_request_body import PostAnyofWithOneEmptySchemaRequestBody +from unit_test_api.api.path_post_api_endpoints.post_anyof_with_one_empty_schema_response_body_for_content_types import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_array_type_matches_arrays_request_body import PostArrayTypeMatchesArraysRequestBody +from unit_test_api.api.path_post_api_endpoints.post_array_type_matches_arrays_response_body_for_content_types import PostArrayTypeMatchesArraysResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_boolean_type_matches_booleans_request_body import PostBooleanTypeMatchesBooleansRequestBody +from unit_test_api.api.path_post_api_endpoints.post_boolean_type_matches_booleans_response_body_for_content_types import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_by_int_request_body import PostByIntRequestBody +from unit_test_api.api.path_post_api_endpoints.post_by_int_response_body_for_content_types import PostByIntResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_by_number_request_body import PostByNumberRequestBody +from unit_test_api.api.path_post_api_endpoints.post_by_number_response_body_for_content_types import PostByNumberResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_by_small_number_request_body import PostBySmallNumberRequestBody +from unit_test_api.api.path_post_api_endpoints.post_by_small_number_response_body_for_content_types import PostBySmallNumberResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_date_time_format_request_body import PostDateTimeFormatRequestBody +from unit_test_api.api.path_post_api_endpoints.post_date_time_format_response_body_for_content_types import PostDateTimeFormatResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_email_format_request_body import PostEmailFormatRequestBody +from unit_test_api.api.path_post_api_endpoints.post_email_format_response_body_for_content_types import PostEmailFormatResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_enum_with0_does_not_match_false_request_body import PostEnumWith0DoesNotMatchFalseRequestBody +from unit_test_api.api.path_post_api_endpoints.post_enum_with0_does_not_match_false_response_body_for_content_types import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_enum_with1_does_not_match_true_request_body import PostEnumWith1DoesNotMatchTrueRequestBody +from unit_test_api.api.path_post_api_endpoints.post_enum_with1_does_not_match_true_response_body_for_content_types import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_enum_with_escaped_characters_request_body import PostEnumWithEscapedCharactersRequestBody +from unit_test_api.api.path_post_api_endpoints.post_enum_with_escaped_characters_response_body_for_content_types import PostEnumWithEscapedCharactersResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_enum_with_false_does_not_match0_request_body import PostEnumWithFalseDoesNotMatch0RequestBody +from unit_test_api.api.path_post_api_endpoints.post_enum_with_false_does_not_match0_response_body_for_content_types import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_enum_with_true_does_not_match1_request_body import PostEnumWithTrueDoesNotMatch1RequestBody +from unit_test_api.api.path_post_api_endpoints.post_enum_with_true_does_not_match1_response_body_for_content_types import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_enums_in_properties_request_body import PostEnumsInPropertiesRequestBody +from unit_test_api.api.path_post_api_endpoints.post_enums_in_properties_response_body_for_content_types import PostEnumsInPropertiesResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_forbidden_property_request_body import PostForbiddenPropertyRequestBody +from unit_test_api.api.path_post_api_endpoints.post_forbidden_property_response_body_for_content_types import PostForbiddenPropertyResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_hostname_format_request_body import PostHostnameFormatRequestBody +from unit_test_api.api.path_post_api_endpoints.post_hostname_format_response_body_for_content_types import PostHostnameFormatResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_integer_type_matches_integers_request_body import PostIntegerTypeMatchesIntegersRequestBody +from unit_test_api.api.path_post_api_endpoints.post_integer_type_matches_integers_response_body_for_content_types import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody +from unit_test_api.api.path_post_api_endpoints.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_invalid_string_value_for_default_request_body import PostInvalidStringValueForDefaultRequestBody +from unit_test_api.api.path_post_api_endpoints.post_invalid_string_value_for_default_response_body_for_content_types import PostInvalidStringValueForDefaultResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_ipv4_format_request_body import PostIpv4FormatRequestBody +from unit_test_api.api.path_post_api_endpoints.post_ipv4_format_response_body_for_content_types import PostIpv4FormatResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_ipv6_format_request_body import PostIpv6FormatRequestBody +from unit_test_api.api.path_post_api_endpoints.post_ipv6_format_response_body_for_content_types import PostIpv6FormatResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_json_pointer_format_request_body import PostJsonPointerFormatRequestBody +from unit_test_api.api.path_post_api_endpoints.post_json_pointer_format_response_body_for_content_types import PostJsonPointerFormatResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_maximum_validation_request_body import PostMaximumValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_maximum_validation_response_body_for_content_types import PostMaximumValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_maximum_validation_with_unsigned_integer_request_body import PostMaximumValidationWithUnsignedIntegerRequestBody +from unit_test_api.api.path_post_api_endpoints.post_maximum_validation_with_unsigned_integer_response_body_for_content_types import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_maxitems_validation_request_body import PostMaxitemsValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_maxitems_validation_response_body_for_content_types import PostMaxitemsValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_maxlength_validation_request_body import PostMaxlengthValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_maxlength_validation_response_body_for_content_types import PostMaxlengthValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_maxproperties0_means_the_object_is_empty_request_body import PostMaxproperties0MeansTheObjectIsEmptyRequestBody +from unit_test_api.api.path_post_api_endpoints.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_maxproperties_validation_request_body import PostMaxpropertiesValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_maxproperties_validation_response_body_for_content_types import PostMaxpropertiesValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_minimum_validation_request_body import PostMinimumValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_minimum_validation_response_body_for_content_types import PostMinimumValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_minimum_validation_with_signed_integer_request_body import PostMinimumValidationWithSignedIntegerRequestBody +from unit_test_api.api.path_post_api_endpoints.post_minimum_validation_with_signed_integer_response_body_for_content_types import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_minitems_validation_request_body import PostMinitemsValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_minitems_validation_response_body_for_content_types import PostMinitemsValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_minlength_validation_request_body import PostMinlengthValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_minlength_validation_response_body_for_content_types import PostMinlengthValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_minproperties_validation_request_body import PostMinpropertiesValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_minproperties_validation_response_body_for_content_types import PostMinpropertiesValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_nested_allof_to_check_validation_semantics_request_body import PostNestedAllofToCheckValidationSemanticsRequestBody +from unit_test_api.api.path_post_api_endpoints.post_nested_allof_to_check_validation_semantics_response_body_for_content_types import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_nested_anyof_to_check_validation_semantics_request_body import PostNestedAnyofToCheckValidationSemanticsRequestBody +from unit_test_api.api.path_post_api_endpoints.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_nested_items_request_body import PostNestedItemsRequestBody +from unit_test_api.api.path_post_api_endpoints.post_nested_items_response_body_for_content_types import PostNestedItemsResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_nested_oneof_to_check_validation_semantics_request_body import PostNestedOneofToCheckValidationSemanticsRequestBody +from unit_test_api.api.path_post_api_endpoints.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_not_more_complex_schema_request_body import PostNotMoreComplexSchemaRequestBody +from unit_test_api.api.path_post_api_endpoints.post_not_more_complex_schema_response_body_for_content_types import PostNotMoreComplexSchemaResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_not_request_body import PostNotRequestBody +from unit_test_api.api.path_post_api_endpoints.post_not_response_body_for_content_types import PostNotResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_nul_characters_in_strings_request_body import PostNulCharactersInStringsRequestBody +from unit_test_api.api.path_post_api_endpoints.post_nul_characters_in_strings_response_body_for_content_types import PostNulCharactersInStringsResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_null_type_matches_only_the_null_object_request_body import PostNullTypeMatchesOnlyTheNullObjectRequestBody +from unit_test_api.api.path_post_api_endpoints.post_null_type_matches_only_the_null_object_response_body_for_content_types import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_number_type_matches_numbers_request_body import PostNumberTypeMatchesNumbersRequestBody +from unit_test_api.api.path_post_api_endpoints.post_number_type_matches_numbers_response_body_for_content_types import PostNumberTypeMatchesNumbersResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_object_properties_validation_request_body import PostObjectPropertiesValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_object_properties_validation_response_body_for_content_types import PostObjectPropertiesValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_object_type_matches_objects_request_body import PostObjectTypeMatchesObjectsRequestBody +from unit_test_api.api.path_post_api_endpoints.post_object_type_matches_objects_response_body_for_content_types import PostObjectTypeMatchesObjectsResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_oneof_complex_types_request_body import PostOneofComplexTypesRequestBody +from unit_test_api.api.path_post_api_endpoints.post_oneof_complex_types_response_body_for_content_types import PostOneofComplexTypesResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_oneof_request_body import PostOneofRequestBody +from unit_test_api.api.path_post_api_endpoints.post_oneof_response_body_for_content_types import PostOneofResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_oneof_with_base_schema_request_body import PostOneofWithBaseSchemaRequestBody +from unit_test_api.api.path_post_api_endpoints.post_oneof_with_base_schema_response_body_for_content_types import PostOneofWithBaseSchemaResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_oneof_with_empty_schema_request_body import PostOneofWithEmptySchemaRequestBody +from unit_test_api.api.path_post_api_endpoints.post_oneof_with_empty_schema_response_body_for_content_types import PostOneofWithEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_pattern_is_not_anchored_request_body import PostPatternIsNotAnchoredRequestBody +from unit_test_api.api.path_post_api_endpoints.post_pattern_is_not_anchored_response_body_for_content_types import PostPatternIsNotAnchoredResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_pattern_validation_request_body import PostPatternValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_pattern_validation_response_body_for_content_types import PostPatternValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_properties_with_escaped_characters_request_body import PostPropertiesWithEscapedCharactersRequestBody +from unit_test_api.api.path_post_api_endpoints.post_properties_with_escaped_characters_response_body_for_content_types import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_property_named_ref_that_is_not_a_reference_request_body import PostPropertyNamedRefThatIsNotAReferenceRequestBody +from unit_test_api.api.path_post_api_endpoints.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_ref_in_additionalproperties_request_body import PostRefInAdditionalpropertiesRequestBody +from unit_test_api.api.path_post_api_endpoints.post_ref_in_additionalproperties_response_body_for_content_types import PostRefInAdditionalpropertiesResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_ref_in_allof_request_body import PostRefInAllofRequestBody +from unit_test_api.api.path_post_api_endpoints.post_ref_in_allof_response_body_for_content_types import PostRefInAllofResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_ref_in_anyof_request_body import PostRefInAnyofRequestBody +from unit_test_api.api.path_post_api_endpoints.post_ref_in_anyof_response_body_for_content_types import PostRefInAnyofResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_ref_in_items_request_body import PostRefInItemsRequestBody +from unit_test_api.api.path_post_api_endpoints.post_ref_in_items_response_body_for_content_types import PostRefInItemsResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_ref_in_oneof_request_body import PostRefInOneofRequestBody +from unit_test_api.api.path_post_api_endpoints.post_ref_in_oneof_response_body_for_content_types import PostRefInOneofResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_ref_in_property_request_body import PostRefInPropertyRequestBody +from unit_test_api.api.path_post_api_endpoints.post_ref_in_property_response_body_for_content_types import PostRefInPropertyResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_required_default_validation_request_body import PostRequiredDefaultValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_required_default_validation_response_body_for_content_types import PostRequiredDefaultValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_required_validation_request_body import PostRequiredValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_required_validation_response_body_for_content_types import PostRequiredValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_required_with_empty_array_request_body import PostRequiredWithEmptyArrayRequestBody +from unit_test_api.api.path_post_api_endpoints.post_required_with_empty_array_response_body_for_content_types import PostRequiredWithEmptyArrayResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_simple_enum_validation_request_body import PostSimpleEnumValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_simple_enum_validation_response_body_for_content_types import PostSimpleEnumValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_string_type_matches_strings_request_body import PostStringTypeMatchesStringsRequestBody +from unit_test_api.api.path_post_api_endpoints.post_string_type_matches_strings_response_body_for_content_types import PostStringTypeMatchesStringsResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody +from unit_test_api.api.path_post_api_endpoints.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_uniqueitems_false_validation_request_body import PostUniqueitemsFalseValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_uniqueitems_false_validation_response_body_for_content_types import PostUniqueitemsFalseValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_uniqueitems_validation_request_body import PostUniqueitemsValidationRequestBody +from unit_test_api.api.path_post_api_endpoints.post_uniqueitems_validation_response_body_for_content_types import PostUniqueitemsValidationResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_uri_format_request_body import PostUriFormatRequestBody +from unit_test_api.api.path_post_api_endpoints.post_uri_format_response_body_for_content_types import PostUriFormatResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_uri_reference_format_request_body import PostUriReferenceFormatRequestBody +from unit_test_api.api.path_post_api_endpoints.post_uri_reference_format_response_body_for_content_types import PostUriReferenceFormatResponseBodyForContentTypes +from unit_test_api.api.path_post_api_endpoints.post_uri_template_format_request_body import PostUriTemplateFormatRequestBody +from unit_test_api.api.path_post_api_endpoints.post_uri_template_format_response_body_for_content_types import PostUriTemplateFormatResponseBodyForContentTypes + + +class PathPostApi( + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, + PostAdditionalpropertiesAreAllowedByDefaultRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfRequestBody, + PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, + PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofRequestBody, + PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + PostAllofRequestBody, + PostAllofResponseBodyForContentTypes, + PostAllofSimpleTypesRequestBody, + PostAllofSimpleTypesResponseBodyForContentTypes, + PostAllofWithBaseSchemaRequestBody, + PostAllofWithBaseSchemaResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaRequestBody, + PostAllofWithOneEmptySchemaResponseBodyForContentTypes, + PostAllofWithTheFirstEmptySchemaRequestBody, + PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + PostAllofWithTheLastEmptySchemaRequestBody, + PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + PostAllofWithTwoEmptySchemasRequestBody, + PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + PostAnyofComplexTypesRequestBody, + PostAnyofComplexTypesResponseBodyForContentTypes, + PostAnyofRequestBody, + PostAnyofResponseBodyForContentTypes, + PostAnyofWithBaseSchemaRequestBody, + PostAnyofWithBaseSchemaResponseBodyForContentTypes, + PostAnyofWithOneEmptySchemaRequestBody, + PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + PostArrayTypeMatchesArraysRequestBody, + PostArrayTypeMatchesArraysResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansRequestBody, + PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + PostByIntRequestBody, + PostByIntResponseBodyForContentTypes, + PostByNumberRequestBody, + PostByNumberResponseBodyForContentTypes, + PostBySmallNumberRequestBody, + PostBySmallNumberResponseBodyForContentTypes, + PostDateTimeFormatRequestBody, + PostDateTimeFormatResponseBodyForContentTypes, + PostEmailFormatRequestBody, + PostEmailFormatResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseRequestBody, + PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + PostEnumWith1DoesNotMatchTrueRequestBody, + PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + PostEnumWithEscapedCharactersRequestBody, + PostEnumWithEscapedCharactersResponseBodyForContentTypes, + PostEnumWithFalseDoesNotMatch0RequestBody, + PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1RequestBody, + PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + PostEnumsInPropertiesRequestBody, + PostEnumsInPropertiesResponseBodyForContentTypes, + PostForbiddenPropertyRequestBody, + PostForbiddenPropertyResponseBodyForContentTypes, + PostHostnameFormatRequestBody, + PostHostnameFormatResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersRequestBody, + PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, + PostInvalidStringValueForDefaultRequestBody, + PostInvalidStringValueForDefaultResponseBodyForContentTypes, + PostIpv4FormatRequestBody, + PostIpv4FormatResponseBodyForContentTypes, + PostIpv6FormatRequestBody, + PostIpv6FormatResponseBodyForContentTypes, + PostJsonPointerFormatRequestBody, + PostJsonPointerFormatResponseBodyForContentTypes, + PostMaximumValidationRequestBody, + PostMaximumValidationResponseBodyForContentTypes, + PostMaximumValidationWithUnsignedIntegerRequestBody, + PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, + PostMaxitemsValidationRequestBody, + PostMaxitemsValidationResponseBodyForContentTypes, + PostMaxlengthValidationRequestBody, + PostMaxlengthValidationResponseBodyForContentTypes, + PostMaxproperties0MeansTheObjectIsEmptyRequestBody, + PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + PostMaxpropertiesValidationRequestBody, + PostMaxpropertiesValidationResponseBodyForContentTypes, + PostMinimumValidationRequestBody, + PostMinimumValidationResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerRequestBody, + PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + PostMinitemsValidationRequestBody, + PostMinitemsValidationResponseBodyForContentTypes, + PostMinlengthValidationRequestBody, + PostMinlengthValidationResponseBodyForContentTypes, + PostMinpropertiesValidationRequestBody, + PostMinpropertiesValidationResponseBodyForContentTypes, + PostNestedAllofToCheckValidationSemanticsRequestBody, + PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + PostNestedAnyofToCheckValidationSemanticsRequestBody, + PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + PostNestedItemsRequestBody, + PostNestedItemsResponseBodyForContentTypes, + PostNestedOneofToCheckValidationSemanticsRequestBody, + PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + PostNotMoreComplexSchemaRequestBody, + PostNotMoreComplexSchemaResponseBodyForContentTypes, + PostNotRequestBody, + PostNotResponseBodyForContentTypes, + PostNulCharactersInStringsRequestBody, + PostNulCharactersInStringsResponseBodyForContentTypes, + PostNullTypeMatchesOnlyTheNullObjectRequestBody, + PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersRequestBody, + PostNumberTypeMatchesNumbersResponseBodyForContentTypes, + PostObjectPropertiesValidationRequestBody, + PostObjectPropertiesValidationResponseBodyForContentTypes, + PostObjectTypeMatchesObjectsRequestBody, + PostObjectTypeMatchesObjectsResponseBodyForContentTypes, + PostOneofComplexTypesRequestBody, + PostOneofComplexTypesResponseBodyForContentTypes, + PostOneofRequestBody, + PostOneofResponseBodyForContentTypes, + PostOneofWithBaseSchemaRequestBody, + PostOneofWithBaseSchemaResponseBodyForContentTypes, + PostOneofWithEmptySchemaRequestBody, + PostOneofWithEmptySchemaResponseBodyForContentTypes, + PostPatternIsNotAnchoredRequestBody, + PostPatternIsNotAnchoredResponseBodyForContentTypes, + PostPatternValidationRequestBody, + PostPatternValidationResponseBodyForContentTypes, + PostPropertiesWithEscapedCharactersRequestBody, + PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, + PostPropertyNamedRefThatIsNotAReferenceRequestBody, + PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + PostRefInAdditionalpropertiesRequestBody, + PostRefInAdditionalpropertiesResponseBodyForContentTypes, + PostRefInAllofRequestBody, + PostRefInAllofResponseBodyForContentTypes, + PostRefInAnyofRequestBody, + PostRefInAnyofResponseBodyForContentTypes, + PostRefInItemsRequestBody, + PostRefInItemsResponseBodyForContentTypes, + PostRefInOneofRequestBody, + PostRefInOneofResponseBodyForContentTypes, + PostRefInPropertyRequestBody, + PostRefInPropertyResponseBodyForContentTypes, + PostRequiredDefaultValidationRequestBody, + PostRequiredDefaultValidationResponseBodyForContentTypes, + PostRequiredValidationRequestBody, + PostRequiredValidationResponseBodyForContentTypes, + PostRequiredWithEmptyArrayRequestBody, + PostRequiredWithEmptyArrayResponseBodyForContentTypes, + PostSimpleEnumValidationRequestBody, + PostSimpleEnumValidationResponseBodyForContentTypes, + PostStringTypeMatchesStringsRequestBody, + PostStringTypeMatchesStringsResponseBodyForContentTypes, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, + PostUniqueitemsFalseValidationRequestBody, + PostUniqueitemsFalseValidationResponseBodyForContentTypes, + PostUniqueitemsValidationRequestBody, + PostUniqueitemsValidationResponseBodyForContentTypes, + PostUriFormatRequestBody, + PostUriFormatResponseBodyForContentTypes, + PostUriReferenceFormatRequestBody, + PostUriReferenceFormatResponseBodyForContentTypes, + PostUriTemplateFormatRequestBody, + PostUriTemplateFormatResponseBodyForContentTypes, + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/__init__.py similarity index 75% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/__init__.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/__init__.py index fa511a84fed..c058425a21d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/json_api_endpoints/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/__init__.py @@ -1,3 +1,3 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.api.json_api import JsonApi +# from unit_test_api.api.path_post_api import PathPostApi diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py new file mode 100644 index 00000000000..ab017b0d652 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate + +_path = '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_are_allowed_by_default_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py new file mode 100644 index 00000000000..ac4cd377ed4 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault + +_path = '/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_can_exist_by_itself_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py new file mode 100644 index 00000000000..fc824349edf --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself + +_path = '/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesCanExistByItself + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_should_not_look_in_applicators_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py new file mode 100644 index 00000000000..64e4e37953b --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators + +_path = '/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_combined_with_anyof_oneof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_combined_with_anyof_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_combined_with_anyof_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..b38b23f6114 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_combined_with_anyof_oneof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof + +_path = '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofCombinedWithAnyofOneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(api_client.Api): + + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_response_body_for_content_types.py new file mode 100644 index 00000000000..e6fab76d9c8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof import Allof + +_path = '/responseBody/postAllofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Allof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofResponseBodyForContentTypes(api_client.Api): + + def post_allof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_simple_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_simple_types_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_simple_types_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_simple_types_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_simple_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_simple_types_response_body_for_content_types.py new file mode 100644 index 00000000000..cf0c42d6060 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_simple_types_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_simple_types import AllofSimpleTypes + +_path = '/responseBody/postAllofSimpleTypesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofSimpleTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofSimpleTypesResponseBodyForContentTypes(api_client.Api): + + def post_allof_simple_types_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_base_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_with_base_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_base_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..1b770152f0a --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema + +_path = '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithBaseSchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_base_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_with_one_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_one_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_with_one_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_one_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_one_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_one_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..f71a310db3d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_one_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema + +_path = '/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithOneEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_one_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_the_first_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_the_first_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_the_first_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..000e53c4352 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_the_first_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema + +_path = '/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithTheFirstEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_the_last_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_the_last_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_the_last_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..86425e2d6a0 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_the_last_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema + +_path = '/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithTheLastEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_with_two_empty_schemas_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_two_empty_schemas_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_allof_with_two_empty_schemas_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_two_empty_schemas_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_two_empty_schemas_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_two_empty_schemas_response_body_for_content_types.py new file mode 100644 index 00000000000..a5acdf4667d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_allof_with_two_empty_schemas_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas + +_path = '/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithTwoEmptySchemas + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_anyof_complex_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_complex_types_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_anyof_complex_types_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_complex_types_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_complex_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_complex_types_response_body_for_content_types.py new file mode 100644 index 00000000000..524e692928e --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_complex_types_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof_complex_types import AnyofComplexTypes + +_path = '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyofComplexTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofComplexTypesResponseBodyForContentTypes(api_client.Api): + + def post_anyof_complex_types_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_anyof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_anyof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_response_body_for_content_types.py new file mode 100644 index 00000000000..3a437519277 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof import Anyof + +_path = '/responseBody/postAnyofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Anyof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofResponseBodyForContentTypes(api_client.Api): + + def post_anyof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_anyof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_with_base_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_anyof_with_base_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_with_base_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..e3910586ca6 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema + +_path = '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofWithBaseSchemaResponseBodyForContentTypes(api_client.Api): + + def post_anyof_with_base_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_anyof_with_one_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_with_one_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_anyof_with_one_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_with_one_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_with_one_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_with_one_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..8542cc54720 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_anyof_with_one_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema + +_path = '/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyofWithOneEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_array_type_matches_arrays_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_array_type_matches_arrays_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_array_type_matches_arrays_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_array_type_matches_arrays_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_array_type_matches_arrays_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_array_type_matches_arrays_response_body_for_content_types.py new file mode 100644 index 00000000000..d7900d4e7ec --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_array_type_matches_arrays_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays + +_path = '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ArrayTypeMatchesArrays + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostArrayTypeMatchesArraysResponseBodyForContentTypes(api_client.Api): + + def post_array_type_matches_arrays_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_boolean_type_matches_booleans_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_boolean_type_matches_booleans_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_boolean_type_matches_booleans_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_boolean_type_matches_booleans_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_boolean_type_matches_booleans_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_boolean_type_matches_booleans_response_body_for_content_types.py new file mode 100644 index 00000000000..c54378bd3f9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_boolean_type_matches_booleans_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = BoolSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(api_client.Api): + + def post_boolean_type_matches_booleans_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_by_int_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_int_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_by_int_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_int_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_int_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_int_response_body_for_content_types.py new file mode 100644 index 00000000000..af450aa23c5 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_int_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.by_int import ByInt + +_path = '/responseBody/postByIntResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ByInt + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostByIntResponseBodyForContentTypes(api_client.Api): + + def post_by_int_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_by_number_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_number_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_by_number_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_number_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_number_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_number_response_body_for_content_types.py new file mode 100644 index 00000000000..3e4d84b48ca --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_number_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.by_number import ByNumber + +_path = '/responseBody/postByNumberResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ByNumber + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostByNumberResponseBodyForContentTypes(api_client.Api): + + def post_by_number_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_by_small_number_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_small_number_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_by_small_number_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_small_number_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_small_number_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_small_number_response_body_for_content_types.py new file mode 100644 index 00000000000..b40379e0c7c --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_by_small_number_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.by_small_number import BySmallNumber + +_path = '/responseBody/postBySmallNumberResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = BySmallNumber + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostBySmallNumberResponseBodyForContentTypes(api_client.Api): + + def post_by_small_number_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_date_time_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_date_time_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_date_time_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_date_time_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_date_time_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_date_time_format_response_body_for_content_types.py new file mode 100644 index 00000000000..79b393d8bc8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_date_time_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postDateTimeFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostDateTimeFormatResponseBodyForContentTypes(api_client.Api): + + def post_date_time_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_email_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_email_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_email_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_email_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_email_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_email_format_response_body_for_content_types.py new file mode 100644 index 00000000000..09084e7ab46 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_email_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postEmailFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEmailFormatResponseBodyForContentTypes(api_client.Api): + + def post_email_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enum_with0_does_not_match_false_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with0_does_not_match_false_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enum_with0_does_not_match_false_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with0_does_not_match_false_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with0_does_not_match_false_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with0_does_not_match_false_response_body_for_content_types.py new file mode 100644 index 00000000000..b9dde493de8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with0_does_not_match_false_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse + +_path = '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWith0DoesNotMatchFalse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(api_client.Api): + + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enum_with1_does_not_match_true_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with1_does_not_match_true_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enum_with1_does_not_match_true_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with1_does_not_match_true_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with1_does_not_match_true_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with1_does_not_match_true_response_body_for_content_types.py new file mode 100644 index 00000000000..55b932ce087 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with1_does_not_match_true_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue + +_path = '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWith1DoesNotMatchTrue + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(api_client.Api): + + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enum_with_escaped_characters_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_escaped_characters_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enum_with_escaped_characters_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_escaped_characters_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_escaped_characters_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..424c5c2f5ad --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters + +_path = '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWithEscapedCharacters + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWithEscapedCharactersResponseBodyForContentTypes(api_client.Api): + + def post_enum_with_escaped_characters_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enum_with_false_does_not_match0_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_false_does_not_match0_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enum_with_false_does_not_match0_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_false_does_not_match0_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_false_does_not_match0_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_false_does_not_match0_response_body_for_content_types.py new file mode 100644 index 00000000000..15fb2319430 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_false_does_not_match0_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 + +_path = '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWithFalseDoesNotMatch0 + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(api_client.Api): + + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enum_with_true_does_not_match1_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_true_does_not_match1_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enum_with_true_does_not_match1_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_true_does_not_match1_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_true_does_not_match1_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_true_does_not_match1_response_body_for_content_types.py new file mode 100644 index 00000000000..1cbfe9e6491 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enum_with_true_does_not_match1_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 + +_path = '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWithTrueDoesNotMatch1 + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(api_client.Api): + + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enums_in_properties_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enums_in_properties_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_enums_in_properties_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enums_in_properties_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enums_in_properties_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enums_in_properties_response_body_for_content_types.py new file mode 100644 index 00000000000..9c78ee93315 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_enums_in_properties_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enums_in_properties import EnumsInProperties + +_path = '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumsInProperties + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumsInPropertiesResponseBodyForContentTypes(api_client.Api): + + def post_enums_in_properties_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_forbidden_property_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_forbidden_property_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_forbidden_property_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_forbidden_property_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_forbidden_property_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_forbidden_property_response_body_for_content_types.py new file mode 100644 index 00000000000..5c8994344e9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_forbidden_property_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.forbidden_property import ForbiddenProperty + +_path = '/responseBody/postForbiddenPropertyResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ForbiddenProperty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostForbiddenPropertyResponseBodyForContentTypes(api_client.Api): + + def post_forbidden_property_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_hostname_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_hostname_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_hostname_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_hostname_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_hostname_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_hostname_format_response_body_for_content_types.py new file mode 100644 index 00000000000..613967dd80f --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_hostname_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postHostnameFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostHostnameFormatResponseBodyForContentTypes(api_client.Api): + + def post_hostname_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_integer_type_matches_integers_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_integer_type_matches_integers_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_integer_type_matches_integers_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_integer_type_matches_integers_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_integer_type_matches_integers_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_integer_type_matches_integers_response_body_for_content_types.py new file mode 100644 index 00000000000..241d3031249 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_integer_type_matches_integers_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = IntSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(api_client.Api): + + def post_integer_type_matches_integers_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py new file mode 100644 index 00000000000..395b1910ba0 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf + +_path = '/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(api_client.Api): + + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_invalid_string_value_for_default_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_invalid_string_value_for_default_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_invalid_string_value_for_default_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_invalid_string_value_for_default_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_invalid_string_value_for_default_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_invalid_string_value_for_default_response_body_for_content_types.py new file mode 100644 index 00000000000..05a4c20a636 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_invalid_string_value_for_default_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault + +_path = '/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = InvalidStringValueForDefault + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostInvalidStringValueForDefaultResponseBodyForContentTypes(api_client.Api): + + def post_invalid_string_value_for_default_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ipv4_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ipv4_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ipv4_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ipv4_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ipv4_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ipv4_format_response_body_for_content_types.py new file mode 100644 index 00000000000..232c3401f0e --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ipv4_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postIpv4FormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostIpv4FormatResponseBodyForContentTypes(api_client.Api): + + def post_ipv4_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ipv6_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ipv6_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ipv6_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ipv6_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ipv6_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ipv6_format_response_body_for_content_types.py new file mode 100644 index 00000000000..6bd0dad761d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ipv6_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postIpv6FormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostIpv6FormatResponseBodyForContentTypes(api_client.Api): + + def post_ipv6_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_json_pointer_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_json_pointer_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_json_pointer_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_json_pointer_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_json_pointer_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_json_pointer_format_response_body_for_content_types.py new file mode 100644 index 00000000000..7fd1aae9688 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_json_pointer_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postJsonPointerFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostJsonPointerFormatResponseBodyForContentTypes(api_client.Api): + + def post_json_pointer_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maximum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maximum_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maximum_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maximum_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maximum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maximum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..f5b5623fec2 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maximum_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maximum_validation import MaximumValidation + +_path = '/responseBody/postMaximumValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaximumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaximumValidationResponseBodyForContentTypes(api_client.Api): + + def post_maximum_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maximum_validation_with_unsigned_integer_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py new file mode 100644 index 00000000000..fb68bb8a628 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger + +_path = '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaximumValidationWithUnsignedInteger + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(api_client.Api): + + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maxitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxitems_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maxitems_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxitems_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..b62833b24c3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxitems_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxitems_validation import MaxitemsValidation + +_path = '/responseBody/postMaxitemsValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaxitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxitemsValidationResponseBodyForContentTypes(api_client.Api): + + def post_maxitems_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maxlength_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxlength_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maxlength_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxlength_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxlength_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxlength_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..298daefa6eb --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxlength_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxlength_validation import MaxlengthValidation + +_path = '/responseBody/postMaxlengthValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaxlengthValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxlengthValidationResponseBodyForContentTypes(api_client.Api): + + def post_maxlength_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxproperties0_means_the_object_is_empty_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py new file mode 100644 index 00000000000..2e3c2c2d635 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty + +_path = '/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(api_client.Api): + + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maxproperties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxproperties_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_maxproperties_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxproperties_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxproperties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxproperties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..8cc19a717b6 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_maxproperties_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation + +_path = '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaxpropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxpropertiesValidationResponseBodyForContentTypes(api_client.Api): + + def post_maxproperties_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_minimum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minimum_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_minimum_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minimum_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minimum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minimum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..3e3e1604290 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minimum_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minimum_validation import MinimumValidation + +_path = '/responseBody/postMinimumValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinimumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinimumValidationResponseBodyForContentTypes(api_client.Api): + + def post_minimum_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minimum_validation_with_signed_integer_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minimum_validation_with_signed_integer_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minimum_validation_with_signed_integer_response_body_for_content_types.py new file mode 100644 index 00000000000..eb81abca930 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minimum_validation_with_signed_integer_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger + +_path = '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinimumValidationWithSignedInteger + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(api_client.Api): + + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_minitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minitems_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_minitems_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minitems_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..d4f4d729d1a --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minitems_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minitems_validation import MinitemsValidation + +_path = '/responseBody/postMinitemsValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinitemsValidationResponseBodyForContentTypes(api_client.Api): + + def post_minitems_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_minlength_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minlength_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_minlength_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minlength_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minlength_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minlength_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..4fbc7018605 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minlength_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minlength_validation import MinlengthValidation + +_path = '/responseBody/postMinlengthValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinlengthValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinlengthValidationResponseBodyForContentTypes(api_client.Api): + + def post_minlength_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_minproperties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minproperties_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_minproperties_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minproperties_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minproperties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minproperties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..ab2363a111b --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_minproperties_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minproperties_validation import MinpropertiesValidation + +_path = '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinpropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinpropertiesValidationResponseBodyForContentTypes(api_client.Api): + + def post_minproperties_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_allof_to_check_validation_semantics_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..90eb860c703 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics + +_path = '/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedAllofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(api_client.Api): + + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_anyof_to_check_validation_semantics_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..33652b7dd61 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics + +_path = '/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedAnyofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(api_client.Api): + + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_nested_items_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_items_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_nested_items_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_items_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_items_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_items_response_body_for_content_types.py new file mode 100644 index 00000000000..f3b3f0832f6 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_items_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_items import NestedItems + +_path = '/responseBody/postNestedItemsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedItems + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedItemsResponseBodyForContentTypes(api_client.Api): + + def post_nested_items_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_oneof_to_check_validation_semantics_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..26f37231030 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics + +_path = '/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedOneofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(api_client.Api): + + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_not_more_complex_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_not_more_complex_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_not_more_complex_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_not_more_complex_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_not_more_complex_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_not_more_complex_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..605f7fc052e --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_not_more_complex_schema_response_body_for_content_types.py @@ -0,0 +1,204 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes' +_method = 'POST' + + +class SchemaFor200ResponseBodyApplicationJson( + ComposedSchema +): + + @classmethod + @property + @functools.cache + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + + + class NotSchema( + DictSchema + ): + foo = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + foo: typing.Union[foo, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'NotSchema': + return super().__new__( + cls, + *args, + foo=foo, + _configuration=_configuration, + **kwargs, + ) + return { + 'allOf': [ + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + 'not': + NotSchema + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNotMoreComplexSchemaResponseBodyForContentTypes(api_client.Api): + + def post_not_more_complex_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_not_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_not_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_not_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_not_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_not_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_not_response_body_for_content_types.py new file mode 100644 index 00000000000..0c9445d620b --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_not_response_body_for_content_types.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNotResponseBodyForContentTypes' +_method = 'POST' + + +class SchemaFor200ResponseBodyApplicationJson( + ComposedSchema +): + + @classmethod + @property + @functools.cache + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + NotSchema = IntSchema + return { + 'allOf': [ + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + 'not': + NotSchema + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNotResponseBodyForContentTypes(api_client.Api): + + def post_not_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_nul_characters_in_strings_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nul_characters_in_strings_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_nul_characters_in_strings_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nul_characters_in_strings_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nul_characters_in_strings_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nul_characters_in_strings_response_body_for_content_types.py new file mode 100644 index 00000000000..e5226d0af3d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_nul_characters_in_strings_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings + +_path = '/responseBody/postNulCharactersInStringsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NulCharactersInStrings + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNulCharactersInStringsResponseBodyForContentTypes(api_client.Api): + + def post_nul_characters_in_strings_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_null_type_matches_only_the_null_object_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_null_type_matches_only_the_null_object_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_null_type_matches_only_the_null_object_response_body_for_content_types.py new file mode 100644 index 00000000000..fa3e9b6abaa --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_null_type_matches_only_the_null_object_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NoneSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(api_client.Api): + + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_number_type_matches_numbers_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_number_type_matches_numbers_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_number_type_matches_numbers_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_number_type_matches_numbers_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_number_type_matches_numbers_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_number_type_matches_numbers_response_body_for_content_types.py new file mode 100644 index 00000000000..13d229bfe4d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_number_type_matches_numbers_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NumberSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(api_client.Api): + + def post_number_type_matches_numbers_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_object_properties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_object_properties_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_object_properties_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_object_properties_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_object_properties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_object_properties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..71ca4bece54 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_object_properties_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation + +_path = '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ObjectPropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostObjectPropertiesValidationResponseBodyForContentTypes(api_client.Api): + + def post_object_properties_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_object_type_matches_objects_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_object_type_matches_objects_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_object_type_matches_objects_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_object_type_matches_objects_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_object_type_matches_objects_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_object_type_matches_objects_response_body_for_content_types.py new file mode 100644 index 00000000000..fe8e08990ff --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_object_type_matches_objects_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = DictSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(api_client.Api): + + def post_object_type_matches_objects_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_oneof_complex_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_complex_types_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_oneof_complex_types_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_complex_types_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_complex_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_complex_types_response_body_for_content_types.py new file mode 100644 index 00000000000..189d0ead7c8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_complex_types_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof_complex_types import OneofComplexTypes + +_path = '/responseBody/postOneofComplexTypesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = OneofComplexTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofComplexTypesResponseBodyForContentTypes(api_client.Api): + + def post_oneof_complex_types_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_oneof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..5feccf681dd --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof import Oneof + +_path = '/responseBody/postOneofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Oneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofResponseBodyForContentTypes(api_client.Api): + + def post_oneof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_oneof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_with_base_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_oneof_with_base_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_with_base_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..e590f083d97 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema + +_path = '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = OneofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofWithBaseSchemaResponseBodyForContentTypes(api_client.Api): + + def post_oneof_with_base_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_oneof_with_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_with_empty_schema_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_oneof_with_empty_schema_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_with_empty_schema_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_with_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_with_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..38801768127 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_oneof_with_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema + +_path = '/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = OneofWithEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofWithEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_oneof_with_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_pattern_is_not_anchored_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_pattern_is_not_anchored_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_pattern_is_not_anchored_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_pattern_is_not_anchored_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_pattern_is_not_anchored_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_pattern_is_not_anchored_response_body_for_content_types.py new file mode 100644 index 00000000000..4d785c183b8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_pattern_is_not_anchored_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored + +_path = '/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PatternIsNotAnchored + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPatternIsNotAnchoredResponseBodyForContentTypes(api_client.Api): + + def post_pattern_is_not_anchored_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_pattern_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_pattern_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_pattern_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_pattern_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_pattern_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_pattern_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..a3a4d168eb8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_pattern_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.pattern_validation import PatternValidation + +_path = '/responseBody/postPatternValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PatternValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPatternValidationResponseBodyForContentTypes(api_client.Api): + + def post_pattern_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_properties_with_escaped_characters_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_properties_with_escaped_characters_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_properties_with_escaped_characters_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_properties_with_escaped_characters_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_properties_with_escaped_characters_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_properties_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..56240f68900 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_properties_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters + +_path = '/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PropertiesWithEscapedCharacters + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(api_client.Api): + + def post_properties_with_escaped_characters_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_property_named_ref_that_is_not_a_reference_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py new file mode 100644 index 00000000000..7d509abfdfe --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference + +_path = '/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PropertyNamedRefThatIsNotAReference + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(api_client.Api): + + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_additionalproperties_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_additionalproperties_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_additionalproperties_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_additionalproperties_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_additionalproperties_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_additionalproperties_response_body_for_content_types.py new file mode 100644 index 00000000000..2639708b354 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_additionalproperties_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties + +_path = '/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInAdditionalproperties + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInAdditionalpropertiesResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_additionalproperties_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_allof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_allof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_allof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_allof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_allof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_allof_response_body_for_content_types.py new file mode 100644 index 00000000000..d9aecd474e4 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_allof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_allof import RefInAllof + +_path = '/responseBody/postRefInAllofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInAllof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInAllofResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_allof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_anyof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_anyof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_anyof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_anyof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_anyof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_anyof_response_body_for_content_types.py new file mode 100644 index 00000000000..e259a9a51c9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_anyof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_anyof import RefInAnyof + +_path = '/responseBody/postRefInAnyofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInAnyof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInAnyofResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_anyof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_items_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_items_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_items_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_items_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_items_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_items_response_body_for_content_types.py new file mode 100644 index 00000000000..0d619752280 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_items_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_items import RefInItems + +_path = '/responseBody/postRefInItemsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInItems + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInItemsResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_items_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_oneof_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_oneof_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_oneof_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..8061ee56220 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_oneof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_oneof import RefInOneof + +_path = '/responseBody/postRefInOneofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInOneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInOneofResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_oneof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_property_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_property_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_ref_in_property_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_property_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_property_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_property_response_body_for_content_types.py new file mode 100644 index 00000000000..137de85ac37 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_ref_in_property_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_property import RefInProperty + +_path = '/responseBody/postRefInPropertyResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInProperty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInPropertyResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_property_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_required_default_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_default_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_required_default_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_default_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_default_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_default_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..92697cb7a01 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_default_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.required_default_validation import RequiredDefaultValidation + +_path = '/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RequiredDefaultValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRequiredDefaultValidationResponseBodyForContentTypes(api_client.Api): + + def post_required_default_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_required_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_required_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..05b8971f8d9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.required_validation import RequiredValidation + +_path = '/responseBody/postRequiredValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RequiredValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRequiredValidationResponseBodyForContentTypes(api_client.Api): + + def post_required_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_required_with_empty_array_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_with_empty_array_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_required_with_empty_array_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_with_empty_array_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_with_empty_array_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_with_empty_array_response_body_for_content_types.py new file mode 100644 index 00000000000..6c8cb2775b2 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_required_with_empty_array_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray + +_path = '/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RequiredWithEmptyArray + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRequiredWithEmptyArrayResponseBodyForContentTypes(api_client.Api): + + def post_required_with_empty_array_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_simple_enum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_simple_enum_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_simple_enum_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_simple_enum_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_simple_enum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_simple_enum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..261f620249c --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_simple_enum_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.simple_enum_validation import SimpleEnumValidation + +_path = '/responseBody/postSimpleEnumValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = SimpleEnumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostSimpleEnumValidationResponseBodyForContentTypes(api_client.Api): + + def post_simple_enum_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_string_type_matches_strings_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_string_type_matches_strings_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_string_type_matches_strings_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_string_type_matches_strings_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_string_type_matches_strings_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_string_type_matches_strings_response_body_for_content_types.py new file mode 100644 index 00000000000..6625a4db867 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_string_type_matches_strings_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = StrSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostStringTypeMatchesStringsResponseBodyForContentTypes(api_client.Api): + + def post_string_type_matches_strings_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py new file mode 100644 index 00000000000..8909c59b712 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing + +_path = '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(api_client.Api): + + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_uniqueitems_false_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uniqueitems_false_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_uniqueitems_false_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uniqueitems_false_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uniqueitems_false_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uniqueitems_false_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..427b8787740 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uniqueitems_false_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation + +_path = '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = UniqueitemsFalseValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUniqueitemsFalseValidationResponseBodyForContentTypes(api_client.Api): + + def post_uniqueitems_false_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_uniqueitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uniqueitems_validation_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_uniqueitems_validation_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uniqueitems_validation_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uniqueitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uniqueitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..937ad878ce9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uniqueitems_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation + +_path = '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = UniqueitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUniqueitemsValidationResponseBodyForContentTypes(api_client.Api): + + def post_uniqueitems_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_uri_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_uri_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_format_response_body_for_content_types.py new file mode 100644 index 00000000000..9b2e9b27c5f --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postUriFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUriFormatResponseBodyForContentTypes(api_client.Api): + + def post_uri_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_uri_reference_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_reference_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_uri_reference_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_reference_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_reference_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_reference_format_response_body_for_content_types.py new file mode 100644 index 00000000000..8dc0f82ca0f --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_reference_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postUriReferenceFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUriReferenceFormatResponseBodyForContentTypes(api_client.Api): + + def post_uri_reference_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_uri_template_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_template_format_request_body.py similarity index 100% rename from samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api_endpoints/post_uri_template_format_request_body.py rename to samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_template_format_request_body.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_template_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_template_format_response_body_for_content_types.py new file mode 100644 index 00000000000..155d57fdb34 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/path_post_api_endpoints/post_uri_template_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postUriTemplateFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUriTemplateFormatResponseBodyForContentTypes(api_client.Api): + + def post_uri_template_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api.py deleted file mode 100644 index 600d208658f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/post_api.py +++ /dev/null @@ -1,191 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.api_client import ApiClient -from unit_test_api.api.post_api_endpoints.post_additionalproperties_allows_a_schema_which_should_validate_request_body import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from unit_test_api.api.post_api_endpoints.post_additionalproperties_are_allowed_by_default_request_body import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from unit_test_api.api.post_api_endpoints.post_additionalproperties_can_exist_by_itself_request_body import PostAdditionalpropertiesCanExistByItselfRequestBody -from unit_test_api.api.post_api_endpoints.post_additionalproperties_should_not_look_in_applicators_request_body import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from unit_test_api.api.post_api_endpoints.post_allof_combined_with_anyof_oneof_request_body import PostAllofCombinedWithAnyofOneofRequestBody -from unit_test_api.api.post_api_endpoints.post_allof_request_body import PostAllofRequestBody -from unit_test_api.api.post_api_endpoints.post_allof_simple_types_request_body import PostAllofSimpleTypesRequestBody -from unit_test_api.api.post_api_endpoints.post_allof_with_base_schema_request_body import PostAllofWithBaseSchemaRequestBody -from unit_test_api.api.post_api_endpoints.post_allof_with_one_empty_schema_request_body import PostAllofWithOneEmptySchemaRequestBody -from unit_test_api.api.post_api_endpoints.post_allof_with_the_first_empty_schema_request_body import PostAllofWithTheFirstEmptySchemaRequestBody -from unit_test_api.api.post_api_endpoints.post_allof_with_the_last_empty_schema_request_body import PostAllofWithTheLastEmptySchemaRequestBody -from unit_test_api.api.post_api_endpoints.post_allof_with_two_empty_schemas_request_body import PostAllofWithTwoEmptySchemasRequestBody -from unit_test_api.api.post_api_endpoints.post_anyof_complex_types_request_body import PostAnyofComplexTypesRequestBody -from unit_test_api.api.post_api_endpoints.post_anyof_request_body import PostAnyofRequestBody -from unit_test_api.api.post_api_endpoints.post_anyof_with_base_schema_request_body import PostAnyofWithBaseSchemaRequestBody -from unit_test_api.api.post_api_endpoints.post_anyof_with_one_empty_schema_request_body import PostAnyofWithOneEmptySchemaRequestBody -from unit_test_api.api.post_api_endpoints.post_array_type_matches_arrays_request_body import PostArrayTypeMatchesArraysRequestBody -from unit_test_api.api.post_api_endpoints.post_boolean_type_matches_booleans_request_body import PostBooleanTypeMatchesBooleansRequestBody -from unit_test_api.api.post_api_endpoints.post_by_int_request_body import PostByIntRequestBody -from unit_test_api.api.post_api_endpoints.post_by_number_request_body import PostByNumberRequestBody -from unit_test_api.api.post_api_endpoints.post_by_small_number_request_body import PostBySmallNumberRequestBody -from unit_test_api.api.post_api_endpoints.post_date_time_format_request_body import PostDateTimeFormatRequestBody -from unit_test_api.api.post_api_endpoints.post_email_format_request_body import PostEmailFormatRequestBody -from unit_test_api.api.post_api_endpoints.post_enum_with0_does_not_match_false_request_body import PostEnumWith0DoesNotMatchFalseRequestBody -from unit_test_api.api.post_api_endpoints.post_enum_with1_does_not_match_true_request_body import PostEnumWith1DoesNotMatchTrueRequestBody -from unit_test_api.api.post_api_endpoints.post_enum_with_escaped_characters_request_body import PostEnumWithEscapedCharactersRequestBody -from unit_test_api.api.post_api_endpoints.post_enum_with_false_does_not_match0_request_body import PostEnumWithFalseDoesNotMatch0RequestBody -from unit_test_api.api.post_api_endpoints.post_enum_with_true_does_not_match1_request_body import PostEnumWithTrueDoesNotMatch1RequestBody -from unit_test_api.api.post_api_endpoints.post_enums_in_properties_request_body import PostEnumsInPropertiesRequestBody -from unit_test_api.api.post_api_endpoints.post_forbidden_property_request_body import PostForbiddenPropertyRequestBody -from unit_test_api.api.post_api_endpoints.post_hostname_format_request_body import PostHostnameFormatRequestBody -from unit_test_api.api.post_api_endpoints.post_integer_type_matches_integers_request_body import PostIntegerTypeMatchesIntegersRequestBody -from unit_test_api.api.post_api_endpoints.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from unit_test_api.api.post_api_endpoints.post_invalid_string_value_for_default_request_body import PostInvalidStringValueForDefaultRequestBody -from unit_test_api.api.post_api_endpoints.post_ipv4_format_request_body import PostIpv4FormatRequestBody -from unit_test_api.api.post_api_endpoints.post_ipv6_format_request_body import PostIpv6FormatRequestBody -from unit_test_api.api.post_api_endpoints.post_json_pointer_format_request_body import PostJsonPointerFormatRequestBody -from unit_test_api.api.post_api_endpoints.post_maximum_validation_request_body import PostMaximumValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_maximum_validation_with_unsigned_integer_request_body import PostMaximumValidationWithUnsignedIntegerRequestBody -from unit_test_api.api.post_api_endpoints.post_maxitems_validation_request_body import PostMaxitemsValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_maxlength_validation_request_body import PostMaxlengthValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_maxproperties0_means_the_object_is_empty_request_body import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from unit_test_api.api.post_api_endpoints.post_maxproperties_validation_request_body import PostMaxpropertiesValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_minimum_validation_request_body import PostMinimumValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_minimum_validation_with_signed_integer_request_body import PostMinimumValidationWithSignedIntegerRequestBody -from unit_test_api.api.post_api_endpoints.post_minitems_validation_request_body import PostMinitemsValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_minlength_validation_request_body import PostMinlengthValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_minproperties_validation_request_body import PostMinpropertiesValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_nested_allof_to_check_validation_semantics_request_body import PostNestedAllofToCheckValidationSemanticsRequestBody -from unit_test_api.api.post_api_endpoints.post_nested_anyof_to_check_validation_semantics_request_body import PostNestedAnyofToCheckValidationSemanticsRequestBody -from unit_test_api.api.post_api_endpoints.post_nested_items_request_body import PostNestedItemsRequestBody -from unit_test_api.api.post_api_endpoints.post_nested_oneof_to_check_validation_semantics_request_body import PostNestedOneofToCheckValidationSemanticsRequestBody -from unit_test_api.api.post_api_endpoints.post_not_more_complex_schema_request_body import PostNotMoreComplexSchemaRequestBody -from unit_test_api.api.post_api_endpoints.post_not_request_body import PostNotRequestBody -from unit_test_api.api.post_api_endpoints.post_nul_characters_in_strings_request_body import PostNulCharactersInStringsRequestBody -from unit_test_api.api.post_api_endpoints.post_null_type_matches_only_the_null_object_request_body import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from unit_test_api.api.post_api_endpoints.post_number_type_matches_numbers_request_body import PostNumberTypeMatchesNumbersRequestBody -from unit_test_api.api.post_api_endpoints.post_object_properties_validation_request_body import PostObjectPropertiesValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_object_type_matches_objects_request_body import PostObjectTypeMatchesObjectsRequestBody -from unit_test_api.api.post_api_endpoints.post_oneof_complex_types_request_body import PostOneofComplexTypesRequestBody -from unit_test_api.api.post_api_endpoints.post_oneof_request_body import PostOneofRequestBody -from unit_test_api.api.post_api_endpoints.post_oneof_with_base_schema_request_body import PostOneofWithBaseSchemaRequestBody -from unit_test_api.api.post_api_endpoints.post_oneof_with_empty_schema_request_body import PostOneofWithEmptySchemaRequestBody -from unit_test_api.api.post_api_endpoints.post_pattern_is_not_anchored_request_body import PostPatternIsNotAnchoredRequestBody -from unit_test_api.api.post_api_endpoints.post_pattern_validation_request_body import PostPatternValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_properties_with_escaped_characters_request_body import PostPropertiesWithEscapedCharactersRequestBody -from unit_test_api.api.post_api_endpoints.post_property_named_ref_that_is_not_a_reference_request_body import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from unit_test_api.api.post_api_endpoints.post_ref_in_additionalproperties_request_body import PostRefInAdditionalpropertiesRequestBody -from unit_test_api.api.post_api_endpoints.post_ref_in_allof_request_body import PostRefInAllofRequestBody -from unit_test_api.api.post_api_endpoints.post_ref_in_anyof_request_body import PostRefInAnyofRequestBody -from unit_test_api.api.post_api_endpoints.post_ref_in_items_request_body import PostRefInItemsRequestBody -from unit_test_api.api.post_api_endpoints.post_ref_in_oneof_request_body import PostRefInOneofRequestBody -from unit_test_api.api.post_api_endpoints.post_ref_in_property_request_body import PostRefInPropertyRequestBody -from unit_test_api.api.post_api_endpoints.post_required_default_validation_request_body import PostRequiredDefaultValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_required_validation_request_body import PostRequiredValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_required_with_empty_array_request_body import PostRequiredWithEmptyArrayRequestBody -from unit_test_api.api.post_api_endpoints.post_simple_enum_validation_request_body import PostSimpleEnumValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_string_type_matches_strings_request_body import PostStringTypeMatchesStringsRequestBody -from unit_test_api.api.post_api_endpoints.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from unit_test_api.api.post_api_endpoints.post_uniqueitems_false_validation_request_body import PostUniqueitemsFalseValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_uniqueitems_validation_request_body import PostUniqueitemsValidationRequestBody -from unit_test_api.api.post_api_endpoints.post_uri_format_request_body import PostUriFormatRequestBody -from unit_test_api.api.post_api_endpoints.post_uri_reference_format_request_body import PostUriReferenceFormatRequestBody -from unit_test_api.api.post_api_endpoints.post_uri_template_format_request_body import PostUriTemplateFormatRequestBody - - -class PostApi( - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PostAllofCombinedWithAnyofOneofRequestBody, - PostAllofRequestBody, - PostAllofSimpleTypesRequestBody, - PostAllofWithBaseSchemaRequestBody, - PostAllofWithOneEmptySchemaRequestBody, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostAllofWithTheLastEmptySchemaRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostAnyofComplexTypesRequestBody, - PostAnyofRequestBody, - PostAnyofWithBaseSchemaRequestBody, - PostAnyofWithOneEmptySchemaRequestBody, - PostArrayTypeMatchesArraysRequestBody, - PostBooleanTypeMatchesBooleansRequestBody, - PostByIntRequestBody, - PostByNumberRequestBody, - PostBySmallNumberRequestBody, - PostDateTimeFormatRequestBody, - PostEmailFormatRequestBody, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostEnumsInPropertiesRequestBody, - PostForbiddenPropertyRequestBody, - PostHostnameFormatRequestBody, - PostIntegerTypeMatchesIntegersRequestBody, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PostInvalidStringValueForDefaultRequestBody, - PostIpv4FormatRequestBody, - PostIpv6FormatRequestBody, - PostJsonPointerFormatRequestBody, - PostMaximumValidationRequestBody, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostMaxitemsValidationRequestBody, - PostMaxlengthValidationRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostMaxpropertiesValidationRequestBody, - PostMinimumValidationRequestBody, - PostMinimumValidationWithSignedIntegerRequestBody, - PostMinitemsValidationRequestBody, - PostMinlengthValidationRequestBody, - PostMinpropertiesValidationRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostNestedItemsRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostNotMoreComplexSchemaRequestBody, - PostNotRequestBody, - PostNulCharactersInStringsRequestBody, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostNumberTypeMatchesNumbersRequestBody, - PostObjectPropertiesValidationRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostOneofComplexTypesRequestBody, - PostOneofRequestBody, - PostOneofWithBaseSchemaRequestBody, - PostOneofWithEmptySchemaRequestBody, - PostPatternIsNotAnchoredRequestBody, - PostPatternValidationRequestBody, - PostPropertiesWithEscapedCharactersRequestBody, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostRefInAdditionalpropertiesRequestBody, - PostRefInAllofRequestBody, - PostRefInAnyofRequestBody, - PostRefInItemsRequestBody, - PostRefInOneofRequestBody, - PostRefInPropertyRequestBody, - PostRequiredDefaultValidationRequestBody, - PostRequiredValidationRequestBody, - PostRequiredWithEmptyArrayRequestBody, - PostSimpleEnumValidationRequestBody, - PostStringTypeMatchesStringsRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PostUniqueitemsFalseValidationRequestBody, - PostUniqueitemsValidationRequestBody, - PostUriFormatRequestBody, - PostUriReferenceFormatRequestBody, - PostUriTemplateFormatRequestBody, - ApiClient, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api.py deleted file mode 100644 index e675e31147c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/request_body_api.py +++ /dev/null @@ -1,191 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.api_client import ApiClient -from unit_test_api.api.request_body_api_endpoints.post_additionalproperties_allows_a_schema_which_should_validate_request_body import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from unit_test_api.api.request_body_api_endpoints.post_additionalproperties_are_allowed_by_default_request_body import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from unit_test_api.api.request_body_api_endpoints.post_additionalproperties_can_exist_by_itself_request_body import PostAdditionalpropertiesCanExistByItselfRequestBody -from unit_test_api.api.request_body_api_endpoints.post_additionalproperties_should_not_look_in_applicators_request_body import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from unit_test_api.api.request_body_api_endpoints.post_allof_combined_with_anyof_oneof_request_body import PostAllofCombinedWithAnyofOneofRequestBody -from unit_test_api.api.request_body_api_endpoints.post_allof_request_body import PostAllofRequestBody -from unit_test_api.api.request_body_api_endpoints.post_allof_simple_types_request_body import PostAllofSimpleTypesRequestBody -from unit_test_api.api.request_body_api_endpoints.post_allof_with_base_schema_request_body import PostAllofWithBaseSchemaRequestBody -from unit_test_api.api.request_body_api_endpoints.post_allof_with_one_empty_schema_request_body import PostAllofWithOneEmptySchemaRequestBody -from unit_test_api.api.request_body_api_endpoints.post_allof_with_the_first_empty_schema_request_body import PostAllofWithTheFirstEmptySchemaRequestBody -from unit_test_api.api.request_body_api_endpoints.post_allof_with_the_last_empty_schema_request_body import PostAllofWithTheLastEmptySchemaRequestBody -from unit_test_api.api.request_body_api_endpoints.post_allof_with_two_empty_schemas_request_body import PostAllofWithTwoEmptySchemasRequestBody -from unit_test_api.api.request_body_api_endpoints.post_anyof_complex_types_request_body import PostAnyofComplexTypesRequestBody -from unit_test_api.api.request_body_api_endpoints.post_anyof_request_body import PostAnyofRequestBody -from unit_test_api.api.request_body_api_endpoints.post_anyof_with_base_schema_request_body import PostAnyofWithBaseSchemaRequestBody -from unit_test_api.api.request_body_api_endpoints.post_anyof_with_one_empty_schema_request_body import PostAnyofWithOneEmptySchemaRequestBody -from unit_test_api.api.request_body_api_endpoints.post_array_type_matches_arrays_request_body import PostArrayTypeMatchesArraysRequestBody -from unit_test_api.api.request_body_api_endpoints.post_boolean_type_matches_booleans_request_body import PostBooleanTypeMatchesBooleansRequestBody -from unit_test_api.api.request_body_api_endpoints.post_by_int_request_body import PostByIntRequestBody -from unit_test_api.api.request_body_api_endpoints.post_by_number_request_body import PostByNumberRequestBody -from unit_test_api.api.request_body_api_endpoints.post_by_small_number_request_body import PostBySmallNumberRequestBody -from unit_test_api.api.request_body_api_endpoints.post_date_time_format_request_body import PostDateTimeFormatRequestBody -from unit_test_api.api.request_body_api_endpoints.post_email_format_request_body import PostEmailFormatRequestBody -from unit_test_api.api.request_body_api_endpoints.post_enum_with0_does_not_match_false_request_body import PostEnumWith0DoesNotMatchFalseRequestBody -from unit_test_api.api.request_body_api_endpoints.post_enum_with1_does_not_match_true_request_body import PostEnumWith1DoesNotMatchTrueRequestBody -from unit_test_api.api.request_body_api_endpoints.post_enum_with_escaped_characters_request_body import PostEnumWithEscapedCharactersRequestBody -from unit_test_api.api.request_body_api_endpoints.post_enum_with_false_does_not_match0_request_body import PostEnumWithFalseDoesNotMatch0RequestBody -from unit_test_api.api.request_body_api_endpoints.post_enum_with_true_does_not_match1_request_body import PostEnumWithTrueDoesNotMatch1RequestBody -from unit_test_api.api.request_body_api_endpoints.post_enums_in_properties_request_body import PostEnumsInPropertiesRequestBody -from unit_test_api.api.request_body_api_endpoints.post_forbidden_property_request_body import PostForbiddenPropertyRequestBody -from unit_test_api.api.request_body_api_endpoints.post_hostname_format_request_body import PostHostnameFormatRequestBody -from unit_test_api.api.request_body_api_endpoints.post_integer_type_matches_integers_request_body import PostIntegerTypeMatchesIntegersRequestBody -from unit_test_api.api.request_body_api_endpoints.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from unit_test_api.api.request_body_api_endpoints.post_invalid_string_value_for_default_request_body import PostInvalidStringValueForDefaultRequestBody -from unit_test_api.api.request_body_api_endpoints.post_ipv4_format_request_body import PostIpv4FormatRequestBody -from unit_test_api.api.request_body_api_endpoints.post_ipv6_format_request_body import PostIpv6FormatRequestBody -from unit_test_api.api.request_body_api_endpoints.post_json_pointer_format_request_body import PostJsonPointerFormatRequestBody -from unit_test_api.api.request_body_api_endpoints.post_maximum_validation_request_body import PostMaximumValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_maximum_validation_with_unsigned_integer_request_body import PostMaximumValidationWithUnsignedIntegerRequestBody -from unit_test_api.api.request_body_api_endpoints.post_maxitems_validation_request_body import PostMaxitemsValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_maxlength_validation_request_body import PostMaxlengthValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_maxproperties0_means_the_object_is_empty_request_body import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from unit_test_api.api.request_body_api_endpoints.post_maxproperties_validation_request_body import PostMaxpropertiesValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_minimum_validation_request_body import PostMinimumValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_minimum_validation_with_signed_integer_request_body import PostMinimumValidationWithSignedIntegerRequestBody -from unit_test_api.api.request_body_api_endpoints.post_minitems_validation_request_body import PostMinitemsValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_minlength_validation_request_body import PostMinlengthValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_minproperties_validation_request_body import PostMinpropertiesValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_nested_allof_to_check_validation_semantics_request_body import PostNestedAllofToCheckValidationSemanticsRequestBody -from unit_test_api.api.request_body_api_endpoints.post_nested_anyof_to_check_validation_semantics_request_body import PostNestedAnyofToCheckValidationSemanticsRequestBody -from unit_test_api.api.request_body_api_endpoints.post_nested_items_request_body import PostNestedItemsRequestBody -from unit_test_api.api.request_body_api_endpoints.post_nested_oneof_to_check_validation_semantics_request_body import PostNestedOneofToCheckValidationSemanticsRequestBody -from unit_test_api.api.request_body_api_endpoints.post_not_more_complex_schema_request_body import PostNotMoreComplexSchemaRequestBody -from unit_test_api.api.request_body_api_endpoints.post_not_request_body import PostNotRequestBody -from unit_test_api.api.request_body_api_endpoints.post_nul_characters_in_strings_request_body import PostNulCharactersInStringsRequestBody -from unit_test_api.api.request_body_api_endpoints.post_null_type_matches_only_the_null_object_request_body import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from unit_test_api.api.request_body_api_endpoints.post_number_type_matches_numbers_request_body import PostNumberTypeMatchesNumbersRequestBody -from unit_test_api.api.request_body_api_endpoints.post_object_properties_validation_request_body import PostObjectPropertiesValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_object_type_matches_objects_request_body import PostObjectTypeMatchesObjectsRequestBody -from unit_test_api.api.request_body_api_endpoints.post_oneof_complex_types_request_body import PostOneofComplexTypesRequestBody -from unit_test_api.api.request_body_api_endpoints.post_oneof_request_body import PostOneofRequestBody -from unit_test_api.api.request_body_api_endpoints.post_oneof_with_base_schema_request_body import PostOneofWithBaseSchemaRequestBody -from unit_test_api.api.request_body_api_endpoints.post_oneof_with_empty_schema_request_body import PostOneofWithEmptySchemaRequestBody -from unit_test_api.api.request_body_api_endpoints.post_pattern_is_not_anchored_request_body import PostPatternIsNotAnchoredRequestBody -from unit_test_api.api.request_body_api_endpoints.post_pattern_validation_request_body import PostPatternValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_properties_with_escaped_characters_request_body import PostPropertiesWithEscapedCharactersRequestBody -from unit_test_api.api.request_body_api_endpoints.post_property_named_ref_that_is_not_a_reference_request_body import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from unit_test_api.api.request_body_api_endpoints.post_ref_in_additionalproperties_request_body import PostRefInAdditionalpropertiesRequestBody -from unit_test_api.api.request_body_api_endpoints.post_ref_in_allof_request_body import PostRefInAllofRequestBody -from unit_test_api.api.request_body_api_endpoints.post_ref_in_anyof_request_body import PostRefInAnyofRequestBody -from unit_test_api.api.request_body_api_endpoints.post_ref_in_items_request_body import PostRefInItemsRequestBody -from unit_test_api.api.request_body_api_endpoints.post_ref_in_oneof_request_body import PostRefInOneofRequestBody -from unit_test_api.api.request_body_api_endpoints.post_ref_in_property_request_body import PostRefInPropertyRequestBody -from unit_test_api.api.request_body_api_endpoints.post_required_default_validation_request_body import PostRequiredDefaultValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_required_validation_request_body import PostRequiredValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_required_with_empty_array_request_body import PostRequiredWithEmptyArrayRequestBody -from unit_test_api.api.request_body_api_endpoints.post_simple_enum_validation_request_body import PostSimpleEnumValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_string_type_matches_strings_request_body import PostStringTypeMatchesStringsRequestBody -from unit_test_api.api.request_body_api_endpoints.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from unit_test_api.api.request_body_api_endpoints.post_uniqueitems_false_validation_request_body import PostUniqueitemsFalseValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_uniqueitems_validation_request_body import PostUniqueitemsValidationRequestBody -from unit_test_api.api.request_body_api_endpoints.post_uri_format_request_body import PostUriFormatRequestBody -from unit_test_api.api.request_body_api_endpoints.post_uri_reference_format_request_body import PostUriReferenceFormatRequestBody -from unit_test_api.api.request_body_api_endpoints.post_uri_template_format_request_body import PostUriTemplateFormatRequestBody - - -class RequestBodyApi( - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PostAllofCombinedWithAnyofOneofRequestBody, - PostAllofRequestBody, - PostAllofSimpleTypesRequestBody, - PostAllofWithBaseSchemaRequestBody, - PostAllofWithOneEmptySchemaRequestBody, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostAllofWithTheLastEmptySchemaRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostAnyofComplexTypesRequestBody, - PostAnyofRequestBody, - PostAnyofWithBaseSchemaRequestBody, - PostAnyofWithOneEmptySchemaRequestBody, - PostArrayTypeMatchesArraysRequestBody, - PostBooleanTypeMatchesBooleansRequestBody, - PostByIntRequestBody, - PostByNumberRequestBody, - PostBySmallNumberRequestBody, - PostDateTimeFormatRequestBody, - PostEmailFormatRequestBody, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostEnumsInPropertiesRequestBody, - PostForbiddenPropertyRequestBody, - PostHostnameFormatRequestBody, - PostIntegerTypeMatchesIntegersRequestBody, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PostInvalidStringValueForDefaultRequestBody, - PostIpv4FormatRequestBody, - PostIpv6FormatRequestBody, - PostJsonPointerFormatRequestBody, - PostMaximumValidationRequestBody, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostMaxitemsValidationRequestBody, - PostMaxlengthValidationRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostMaxpropertiesValidationRequestBody, - PostMinimumValidationRequestBody, - PostMinimumValidationWithSignedIntegerRequestBody, - PostMinitemsValidationRequestBody, - PostMinlengthValidationRequestBody, - PostMinpropertiesValidationRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostNestedItemsRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostNotMoreComplexSchemaRequestBody, - PostNotRequestBody, - PostNulCharactersInStringsRequestBody, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostNumberTypeMatchesNumbersRequestBody, - PostObjectPropertiesValidationRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostOneofComplexTypesRequestBody, - PostOneofRequestBody, - PostOneofWithBaseSchemaRequestBody, - PostOneofWithEmptySchemaRequestBody, - PostPatternIsNotAnchoredRequestBody, - PostPatternValidationRequestBody, - PostPropertiesWithEscapedCharactersRequestBody, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostRefInAdditionalpropertiesRequestBody, - PostRefInAllofRequestBody, - PostRefInAnyofRequestBody, - PostRefInItemsRequestBody, - PostRefInOneofRequestBody, - PostRefInPropertyRequestBody, - PostRequiredDefaultValidationRequestBody, - PostRequiredValidationRequestBody, - PostRequiredWithEmptyArrayRequestBody, - PostSimpleEnumValidationRequestBody, - PostStringTypeMatchesStringsRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PostUniqueitemsFalseValidationRequestBody, - PostUniqueitemsValidationRequestBody, - PostUriFormatRequestBody, - PostUriReferenceFormatRequestBody, - PostUriTemplateFormatRequestBody, - ApiClient, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api.py new file mode 100644 index 00000000000..be2998f5fa7 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + + The version of the OpenAPI document: 0.0.1 + Generated by: https://openapi-generator.tech +""" + +from unit_test_api.api_client import ApiClient +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_additionalproperties_are_allowed_by_default_response_body_for_content_types import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_additionalproperties_can_exist_by_itself_response_body_for_content_types import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_allof_combined_with_anyof_oneof_response_body_for_content_types import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_allof_response_body_for_content_types import PostAllofResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_allof_simple_types_response_body_for_content_types import PostAllofSimpleTypesResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_allof_with_base_schema_response_body_for_content_types import PostAllofWithBaseSchemaResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_allof_with_one_empty_schema_response_body_for_content_types import PostAllofWithOneEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_allof_with_the_first_empty_schema_response_body_for_content_types import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_allof_with_the_last_empty_schema_response_body_for_content_types import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_allof_with_two_empty_schemas_response_body_for_content_types import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_anyof_complex_types_response_body_for_content_types import PostAnyofComplexTypesResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_anyof_response_body_for_content_types import PostAnyofResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_anyof_with_base_schema_response_body_for_content_types import PostAnyofWithBaseSchemaResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_anyof_with_one_empty_schema_response_body_for_content_types import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_array_type_matches_arrays_response_body_for_content_types import PostArrayTypeMatchesArraysResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_boolean_type_matches_booleans_response_body_for_content_types import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_by_int_response_body_for_content_types import PostByIntResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_by_number_response_body_for_content_types import PostByNumberResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_by_small_number_response_body_for_content_types import PostBySmallNumberResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_date_time_format_response_body_for_content_types import PostDateTimeFormatResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_email_format_response_body_for_content_types import PostEmailFormatResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_enum_with0_does_not_match_false_response_body_for_content_types import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_enum_with1_does_not_match_true_response_body_for_content_types import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_enum_with_escaped_characters_response_body_for_content_types import PostEnumWithEscapedCharactersResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_enum_with_false_does_not_match0_response_body_for_content_types import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_enum_with_true_does_not_match1_response_body_for_content_types import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_enums_in_properties_response_body_for_content_types import PostEnumsInPropertiesResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_forbidden_property_response_body_for_content_types import PostForbiddenPropertyResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_hostname_format_response_body_for_content_types import PostHostnameFormatResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_integer_type_matches_integers_response_body_for_content_types import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_invalid_string_value_for_default_response_body_for_content_types import PostInvalidStringValueForDefaultResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_ipv4_format_response_body_for_content_types import PostIpv4FormatResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_ipv6_format_response_body_for_content_types import PostIpv6FormatResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_json_pointer_format_response_body_for_content_types import PostJsonPointerFormatResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_maximum_validation_response_body_for_content_types import PostMaximumValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_maximum_validation_with_unsigned_integer_response_body_for_content_types import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_maxitems_validation_response_body_for_content_types import PostMaxitemsValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_maxlength_validation_response_body_for_content_types import PostMaxlengthValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_maxproperties_validation_response_body_for_content_types import PostMaxpropertiesValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_minimum_validation_response_body_for_content_types import PostMinimumValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_minimum_validation_with_signed_integer_response_body_for_content_types import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_minitems_validation_response_body_for_content_types import PostMinitemsValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_minlength_validation_response_body_for_content_types import PostMinlengthValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_minproperties_validation_response_body_for_content_types import PostMinpropertiesValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_nested_allof_to_check_validation_semantics_response_body_for_content_types import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_nested_items_response_body_for_content_types import PostNestedItemsResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_not_more_complex_schema_response_body_for_content_types import PostNotMoreComplexSchemaResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_not_response_body_for_content_types import PostNotResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_nul_characters_in_strings_response_body_for_content_types import PostNulCharactersInStringsResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_null_type_matches_only_the_null_object_response_body_for_content_types import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_number_type_matches_numbers_response_body_for_content_types import PostNumberTypeMatchesNumbersResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_object_properties_validation_response_body_for_content_types import PostObjectPropertiesValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_object_type_matches_objects_response_body_for_content_types import PostObjectTypeMatchesObjectsResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_oneof_complex_types_response_body_for_content_types import PostOneofComplexTypesResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_oneof_response_body_for_content_types import PostOneofResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_oneof_with_base_schema_response_body_for_content_types import PostOneofWithBaseSchemaResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_oneof_with_empty_schema_response_body_for_content_types import PostOneofWithEmptySchemaResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_pattern_is_not_anchored_response_body_for_content_types import PostPatternIsNotAnchoredResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_pattern_validation_response_body_for_content_types import PostPatternValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_properties_with_escaped_characters_response_body_for_content_types import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_ref_in_additionalproperties_response_body_for_content_types import PostRefInAdditionalpropertiesResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_ref_in_allof_response_body_for_content_types import PostRefInAllofResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_ref_in_anyof_response_body_for_content_types import PostRefInAnyofResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_ref_in_items_response_body_for_content_types import PostRefInItemsResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_ref_in_oneof_response_body_for_content_types import PostRefInOneofResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_ref_in_property_response_body_for_content_types import PostRefInPropertyResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_required_default_validation_response_body_for_content_types import PostRequiredDefaultValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_required_validation_response_body_for_content_types import PostRequiredValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_required_with_empty_array_response_body_for_content_types import PostRequiredWithEmptyArrayResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_simple_enum_validation_response_body_for_content_types import PostSimpleEnumValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_string_type_matches_strings_response_body_for_content_types import PostStringTypeMatchesStringsResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_uniqueitems_false_validation_response_body_for_content_types import PostUniqueitemsFalseValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_uniqueitems_validation_response_body_for_content_types import PostUniqueitemsValidationResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_uri_format_response_body_for_content_types import PostUriFormatResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_uri_reference_format_response_body_for_content_types import PostUriReferenceFormatResponseBodyForContentTypes +from unit_test_api.api.response_content_content_type_schema_api_endpoints.post_uri_template_format_response_body_for_content_types import PostUriTemplateFormatResponseBodyForContentTypes + + +class ResponseContentContentTypeSchemaApi( + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, + PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + PostAllofResponseBodyForContentTypes, + PostAllofSimpleTypesResponseBodyForContentTypes, + PostAllofWithBaseSchemaResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaResponseBodyForContentTypes, + PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + PostAnyofComplexTypesResponseBodyForContentTypes, + PostAnyofResponseBodyForContentTypes, + PostAnyofWithBaseSchemaResponseBodyForContentTypes, + PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + PostArrayTypeMatchesArraysResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + PostByIntResponseBodyForContentTypes, + PostByNumberResponseBodyForContentTypes, + PostBySmallNumberResponseBodyForContentTypes, + PostDateTimeFormatResponseBodyForContentTypes, + PostEmailFormatResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + PostEnumWithEscapedCharactersResponseBodyForContentTypes, + PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + PostEnumsInPropertiesResponseBodyForContentTypes, + PostForbiddenPropertyResponseBodyForContentTypes, + PostHostnameFormatResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, + PostInvalidStringValueForDefaultResponseBodyForContentTypes, + PostIpv4FormatResponseBodyForContentTypes, + PostIpv6FormatResponseBodyForContentTypes, + PostJsonPointerFormatResponseBodyForContentTypes, + PostMaximumValidationResponseBodyForContentTypes, + PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, + PostMaxitemsValidationResponseBodyForContentTypes, + PostMaxlengthValidationResponseBodyForContentTypes, + PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + PostMaxpropertiesValidationResponseBodyForContentTypes, + PostMinimumValidationResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + PostMinitemsValidationResponseBodyForContentTypes, + PostMinlengthValidationResponseBodyForContentTypes, + PostMinpropertiesValidationResponseBodyForContentTypes, + PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + PostNestedItemsResponseBodyForContentTypes, + PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + PostNotMoreComplexSchemaResponseBodyForContentTypes, + PostNotResponseBodyForContentTypes, + PostNulCharactersInStringsResponseBodyForContentTypes, + PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersResponseBodyForContentTypes, + PostObjectPropertiesValidationResponseBodyForContentTypes, + PostObjectTypeMatchesObjectsResponseBodyForContentTypes, + PostOneofComplexTypesResponseBodyForContentTypes, + PostOneofResponseBodyForContentTypes, + PostOneofWithBaseSchemaResponseBodyForContentTypes, + PostOneofWithEmptySchemaResponseBodyForContentTypes, + PostPatternIsNotAnchoredResponseBodyForContentTypes, + PostPatternValidationResponseBodyForContentTypes, + PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, + PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + PostRefInAdditionalpropertiesResponseBodyForContentTypes, + PostRefInAllofResponseBodyForContentTypes, + PostRefInAnyofResponseBodyForContentTypes, + PostRefInItemsResponseBodyForContentTypes, + PostRefInOneofResponseBodyForContentTypes, + PostRefInPropertyResponseBodyForContentTypes, + PostRequiredDefaultValidationResponseBodyForContentTypes, + PostRequiredValidationResponseBodyForContentTypes, + PostRequiredWithEmptyArrayResponseBodyForContentTypes, + PostSimpleEnumValidationResponseBodyForContentTypes, + PostStringTypeMatchesStringsResponseBodyForContentTypes, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, + PostUniqueitemsFalseValidationResponseBodyForContentTypes, + PostUniqueitemsValidationResponseBodyForContentTypes, + PostUriFormatResponseBodyForContentTypes, + PostUriReferenceFormatResponseBodyForContentTypes, + PostUriTemplateFormatResponseBodyForContentTypes, + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/__init__.py new file mode 100644 index 00000000000..89f1d36df09 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from unit_test_api.api.response_content_content_type_schema_api import ResponseContentContentTypeSchemaApi diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py new file mode 100644 index 00000000000..ab017b0d652 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate + +_path = '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py new file mode 100644 index 00000000000..ac4cd377ed4 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault + +_path = '/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py new file mode 100644 index 00000000000..fc824349edf --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself + +_path = '/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesCanExistByItself + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py new file mode 100644 index 00000000000..64e4e37953b --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators + +_path = '/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(api_client.Api): + + def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_combined_with_anyof_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_combined_with_anyof_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..b38b23f6114 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_combined_with_anyof_oneof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof + +_path = '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofCombinedWithAnyofOneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(api_client.Api): + + def post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_response_body_for_content_types.py new file mode 100644 index 00000000000..e6fab76d9c8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof import Allof + +_path = '/responseBody/postAllofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Allof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofResponseBodyForContentTypes(api_client.Api): + + def post_allof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_simple_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_simple_types_response_body_for_content_types.py new file mode 100644 index 00000000000..cf0c42d6060 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_simple_types_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_simple_types import AllofSimpleTypes + +_path = '/responseBody/postAllofSimpleTypesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofSimpleTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofSimpleTypesResponseBodyForContentTypes(api_client.Api): + + def post_allof_simple_types_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..1b770152f0a --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema + +_path = '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithBaseSchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_base_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_one_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_one_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..f71a310db3d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_one_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema + +_path = '/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithOneEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_one_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_the_first_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_the_first_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..000e53c4352 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_the_first_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema + +_path = '/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithTheFirstEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_the_first_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_the_last_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_the_last_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..86425e2d6a0 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_the_last_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema + +_path = '/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithTheLastEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_the_last_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_two_empty_schemas_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_two_empty_schemas_response_body_for_content_types.py new file mode 100644 index 00000000000..a5acdf4667d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_allof_with_two_empty_schemas_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas + +_path = '/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AllofWithTwoEmptySchemas + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(api_client.Api): + + def post_allof_with_two_empty_schemas_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_complex_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_complex_types_response_body_for_content_types.py new file mode 100644 index 00000000000..524e692928e --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_complex_types_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof_complex_types import AnyofComplexTypes + +_path = '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyofComplexTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofComplexTypesResponseBodyForContentTypes(api_client.Api): + + def post_anyof_complex_types_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_response_body_for_content_types.py new file mode 100644 index 00000000000..3a437519277 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof import Anyof + +_path = '/responseBody/postAnyofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Anyof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofResponseBodyForContentTypes(api_client.Api): + + def post_anyof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..e3910586ca6 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema + +_path = '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofWithBaseSchemaResponseBodyForContentTypes(api_client.Api): + + def post_anyof_with_base_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_with_one_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_with_one_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..8542cc54720 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_anyof_with_one_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema + +_path = '/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyofWithOneEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_anyof_with_one_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_array_type_matches_arrays_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_array_type_matches_arrays_response_body_for_content_types.py new file mode 100644 index 00000000000..d7900d4e7ec --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_array_type_matches_arrays_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays + +_path = '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ArrayTypeMatchesArrays + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostArrayTypeMatchesArraysResponseBodyForContentTypes(api_client.Api): + + def post_array_type_matches_arrays_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_boolean_type_matches_booleans_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_boolean_type_matches_booleans_response_body_for_content_types.py new file mode 100644 index 00000000000..c54378bd3f9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_boolean_type_matches_booleans_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = BoolSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(api_client.Api): + + def post_boolean_type_matches_booleans_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_by_int_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_by_int_response_body_for_content_types.py new file mode 100644 index 00000000000..af450aa23c5 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_by_int_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.by_int import ByInt + +_path = '/responseBody/postByIntResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ByInt + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostByIntResponseBodyForContentTypes(api_client.Api): + + def post_by_int_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_by_number_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_by_number_response_body_for_content_types.py new file mode 100644 index 00000000000..3e4d84b48ca --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_by_number_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.by_number import ByNumber + +_path = '/responseBody/postByNumberResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ByNumber + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostByNumberResponseBodyForContentTypes(api_client.Api): + + def post_by_number_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_by_small_number_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_by_small_number_response_body_for_content_types.py new file mode 100644 index 00000000000..b40379e0c7c --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_by_small_number_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.by_small_number import BySmallNumber + +_path = '/responseBody/postBySmallNumberResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = BySmallNumber + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostBySmallNumberResponseBodyForContentTypes(api_client.Api): + + def post_by_small_number_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_date_time_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_date_time_format_response_body_for_content_types.py new file mode 100644 index 00000000000..79b393d8bc8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_date_time_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postDateTimeFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostDateTimeFormatResponseBodyForContentTypes(api_client.Api): + + def post_date_time_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_email_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_email_format_response_body_for_content_types.py new file mode 100644 index 00000000000..09084e7ab46 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_email_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postEmailFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEmailFormatResponseBodyForContentTypes(api_client.Api): + + def post_email_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with0_does_not_match_false_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with0_does_not_match_false_response_body_for_content_types.py new file mode 100644 index 00000000000..b9dde493de8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with0_does_not_match_false_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse + +_path = '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWith0DoesNotMatchFalse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(api_client.Api): + + def post_enum_with0_does_not_match_false_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with1_does_not_match_true_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with1_does_not_match_true_response_body_for_content_types.py new file mode 100644 index 00000000000..55b932ce087 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with1_does_not_match_true_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue + +_path = '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWith1DoesNotMatchTrue + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(api_client.Api): + + def post_enum_with1_does_not_match_true_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with_escaped_characters_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..424c5c2f5ad --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters + +_path = '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWithEscapedCharacters + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWithEscapedCharactersResponseBodyForContentTypes(api_client.Api): + + def post_enum_with_escaped_characters_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with_false_does_not_match0_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with_false_does_not_match0_response_body_for_content_types.py new file mode 100644 index 00000000000..15fb2319430 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with_false_does_not_match0_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 + +_path = '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWithFalseDoesNotMatch0 + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(api_client.Api): + + def post_enum_with_false_does_not_match0_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with_true_does_not_match1_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with_true_does_not_match1_response_body_for_content_types.py new file mode 100644 index 00000000000..1cbfe9e6491 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enum_with_true_does_not_match1_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 + +_path = '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumWithTrueDoesNotMatch1 + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(api_client.Api): + + def post_enum_with_true_does_not_match1_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enums_in_properties_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enums_in_properties_response_body_for_content_types.py new file mode 100644 index 00000000000..9c78ee93315 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_enums_in_properties_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.enums_in_properties import EnumsInProperties + +_path = '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = EnumsInProperties + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostEnumsInPropertiesResponseBodyForContentTypes(api_client.Api): + + def post_enums_in_properties_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_forbidden_property_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_forbidden_property_response_body_for_content_types.py new file mode 100644 index 00000000000..5c8994344e9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_forbidden_property_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.forbidden_property import ForbiddenProperty + +_path = '/responseBody/postForbiddenPropertyResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ForbiddenProperty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostForbiddenPropertyResponseBodyForContentTypes(api_client.Api): + + def post_forbidden_property_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_hostname_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_hostname_format_response_body_for_content_types.py new file mode 100644 index 00000000000..613967dd80f --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_hostname_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postHostnameFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostHostnameFormatResponseBodyForContentTypes(api_client.Api): + + def post_hostname_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_integer_type_matches_integers_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_integer_type_matches_integers_response_body_for_content_types.py new file mode 100644 index 00000000000..241d3031249 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_integer_type_matches_integers_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = IntSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(api_client.Api): + + def post_integer_type_matches_integers_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py new file mode 100644 index 00000000000..395b1910ba0 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf + +_path = '/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(api_client.Api): + + def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_invalid_string_value_for_default_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_invalid_string_value_for_default_response_body_for_content_types.py new file mode 100644 index 00000000000..05a4c20a636 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_invalid_string_value_for_default_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault + +_path = '/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = InvalidStringValueForDefault + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostInvalidStringValueForDefaultResponseBodyForContentTypes(api_client.Api): + + def post_invalid_string_value_for_default_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ipv4_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ipv4_format_response_body_for_content_types.py new file mode 100644 index 00000000000..232c3401f0e --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ipv4_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postIpv4FormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostIpv4FormatResponseBodyForContentTypes(api_client.Api): + + def post_ipv4_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ipv6_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ipv6_format_response_body_for_content_types.py new file mode 100644 index 00000000000..6bd0dad761d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ipv6_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postIpv6FormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostIpv6FormatResponseBodyForContentTypes(api_client.Api): + + def post_ipv6_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_json_pointer_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_json_pointer_format_response_body_for_content_types.py new file mode 100644 index 00000000000..7fd1aae9688 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_json_pointer_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postJsonPointerFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostJsonPointerFormatResponseBodyForContentTypes(api_client.Api): + + def post_json_pointer_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maximum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maximum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..f5b5623fec2 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maximum_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maximum_validation import MaximumValidation + +_path = '/responseBody/postMaximumValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaximumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaximumValidationResponseBodyForContentTypes(api_client.Api): + + def post_maximum_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py new file mode 100644 index 00000000000..fb68bb8a628 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger + +_path = '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaximumValidationWithUnsignedInteger + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(api_client.Api): + + def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..b62833b24c3 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxitems_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxitems_validation import MaxitemsValidation + +_path = '/responseBody/postMaxitemsValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaxitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxitemsValidationResponseBodyForContentTypes(api_client.Api): + + def post_maxitems_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxlength_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxlength_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..298daefa6eb --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxlength_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxlength_validation import MaxlengthValidation + +_path = '/responseBody/postMaxlengthValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaxlengthValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxlengthValidationResponseBodyForContentTypes(api_client.Api): + + def post_maxlength_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py new file mode 100644 index 00000000000..2e3c2c2d635 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty + +_path = '/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(api_client.Api): + + def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxproperties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxproperties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..8cc19a717b6 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_maxproperties_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation + +_path = '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MaxpropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMaxpropertiesValidationResponseBodyForContentTypes(api_client.Api): + + def post_maxproperties_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minimum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minimum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..3e3e1604290 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minimum_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minimum_validation import MinimumValidation + +_path = '/responseBody/postMinimumValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinimumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinimumValidationResponseBodyForContentTypes(api_client.Api): + + def post_minimum_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minimum_validation_with_signed_integer_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minimum_validation_with_signed_integer_response_body_for_content_types.py new file mode 100644 index 00000000000..eb81abca930 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minimum_validation_with_signed_integer_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger + +_path = '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinimumValidationWithSignedInteger + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(api_client.Api): + + def post_minimum_validation_with_signed_integer_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..d4f4d729d1a --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minitems_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minitems_validation import MinitemsValidation + +_path = '/responseBody/postMinitemsValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinitemsValidationResponseBodyForContentTypes(api_client.Api): + + def post_minitems_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minlength_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minlength_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..4fbc7018605 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minlength_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minlength_validation import MinlengthValidation + +_path = '/responseBody/postMinlengthValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinlengthValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinlengthValidationResponseBodyForContentTypes(api_client.Api): + + def post_minlength_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minproperties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minproperties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..ab2363a111b --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_minproperties_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.minproperties_validation import MinpropertiesValidation + +_path = '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = MinpropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostMinpropertiesValidationResponseBodyForContentTypes(api_client.Api): + + def post_minproperties_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..90eb860c703 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics + +_path = '/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedAllofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(api_client.Api): + + def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..33652b7dd61 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics + +_path = '/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedAnyofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(api_client.Api): + + def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_items_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_items_response_body_for_content_types.py new file mode 100644 index 00000000000..f3b3f0832f6 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_items_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_items import NestedItems + +_path = '/responseBody/postNestedItemsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedItems + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedItemsResponseBodyForContentTypes(api_client.Api): + + def post_nested_items_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..26f37231030 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics + +_path = '/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NestedOneofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(api_client.Api): + + def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_not_more_complex_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_not_more_complex_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..605f7fc052e --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_not_more_complex_schema_response_body_for_content_types.py @@ -0,0 +1,204 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes' +_method = 'POST' + + +class SchemaFor200ResponseBodyApplicationJson( + ComposedSchema +): + + @classmethod + @property + @functools.cache + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + + + class NotSchema( + DictSchema + ): + foo = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + foo: typing.Union[foo, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'NotSchema': + return super().__new__( + cls, + *args, + foo=foo, + _configuration=_configuration, + **kwargs, + ) + return { + 'allOf': [ + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + 'not': + NotSchema + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNotMoreComplexSchemaResponseBodyForContentTypes(api_client.Api): + + def post_not_more_complex_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_not_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_not_response_body_for_content_types.py new file mode 100644 index 00000000000..0c9445d620b --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_not_response_body_for_content_types.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNotResponseBodyForContentTypes' +_method = 'POST' + + +class SchemaFor200ResponseBodyApplicationJson( + ComposedSchema +): + + @classmethod + @property + @functools.cache + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + NotSchema = IntSchema + return { + 'allOf': [ + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + 'not': + NotSchema + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNotResponseBodyForContentTypes(api_client.Api): + + def post_not_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nul_characters_in_strings_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nul_characters_in_strings_response_body_for_content_types.py new file mode 100644 index 00000000000..e5226d0af3d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_nul_characters_in_strings_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings + +_path = '/responseBody/postNulCharactersInStringsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NulCharactersInStrings + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNulCharactersInStringsResponseBodyForContentTypes(api_client.Api): + + def post_nul_characters_in_strings_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_null_type_matches_only_the_null_object_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_null_type_matches_only_the_null_object_response_body_for_content_types.py new file mode 100644 index 00000000000..fa3e9b6abaa --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_null_type_matches_only_the_null_object_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NoneSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(api_client.Api): + + def post_null_type_matches_only_the_null_object_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_number_type_matches_numbers_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_number_type_matches_numbers_response_body_for_content_types.py new file mode 100644 index 00000000000..13d229bfe4d --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_number_type_matches_numbers_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NumberSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(api_client.Api): + + def post_number_type_matches_numbers_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_object_properties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_object_properties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..71ca4bece54 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_object_properties_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation + +_path = '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ObjectPropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostObjectPropertiesValidationResponseBodyForContentTypes(api_client.Api): + + def post_object_properties_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_object_type_matches_objects_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_object_type_matches_objects_response_body_for_content_types.py new file mode 100644 index 00000000000..fe8e08990ff --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_object_type_matches_objects_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = DictSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(api_client.Api): + + def post_object_type_matches_objects_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_complex_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_complex_types_response_body_for_content_types.py new file mode 100644 index 00000000000..189d0ead7c8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_complex_types_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof_complex_types import OneofComplexTypes + +_path = '/responseBody/postOneofComplexTypesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = OneofComplexTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofComplexTypesResponseBodyForContentTypes(api_client.Api): + + def post_oneof_complex_types_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..5feccf681dd --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof import Oneof + +_path = '/responseBody/postOneofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Oneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofResponseBodyForContentTypes(api_client.Api): + + def post_oneof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..e590f083d97 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema + +_path = '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = OneofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofWithBaseSchemaResponseBodyForContentTypes(api_client.Api): + + def post_oneof_with_base_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_with_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_with_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..38801768127 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_oneof_with_empty_schema_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema + +_path = '/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = OneofWithEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostOneofWithEmptySchemaResponseBodyForContentTypes(api_client.Api): + + def post_oneof_with_empty_schema_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_pattern_is_not_anchored_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_pattern_is_not_anchored_response_body_for_content_types.py new file mode 100644 index 00000000000..4d785c183b8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_pattern_is_not_anchored_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored + +_path = '/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PatternIsNotAnchored + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPatternIsNotAnchoredResponseBodyForContentTypes(api_client.Api): + + def post_pattern_is_not_anchored_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_pattern_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_pattern_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..a3a4d168eb8 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_pattern_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.pattern_validation import PatternValidation + +_path = '/responseBody/postPatternValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PatternValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPatternValidationResponseBodyForContentTypes(api_client.Api): + + def post_pattern_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_properties_with_escaped_characters_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_properties_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..56240f68900 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_properties_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters + +_path = '/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PropertiesWithEscapedCharacters + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(api_client.Api): + + def post_properties_with_escaped_characters_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py new file mode 100644 index 00000000000..7d509abfdfe --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference + +_path = '/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = PropertyNamedRefThatIsNotAReference + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(api_client.Api): + + def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_additionalproperties_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_additionalproperties_response_body_for_content_types.py new file mode 100644 index 00000000000..2639708b354 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_additionalproperties_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties + +_path = '/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInAdditionalproperties + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInAdditionalpropertiesResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_additionalproperties_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_allof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_allof_response_body_for_content_types.py new file mode 100644 index 00000000000..d9aecd474e4 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_allof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_allof import RefInAllof + +_path = '/responseBody/postRefInAllofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInAllof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInAllofResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_allof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_anyof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_anyof_response_body_for_content_types.py new file mode 100644 index 00000000000..e259a9a51c9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_anyof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_anyof import RefInAnyof + +_path = '/responseBody/postRefInAnyofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInAnyof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInAnyofResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_anyof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_items_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_items_response_body_for_content_types.py new file mode 100644 index 00000000000..0d619752280 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_items_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_items import RefInItems + +_path = '/responseBody/postRefInItemsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInItems + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInItemsResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_items_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..8061ee56220 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_oneof_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_oneof import RefInOneof + +_path = '/responseBody/postRefInOneofResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInOneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInOneofResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_oneof_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_property_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_property_response_body_for_content_types.py new file mode 100644 index 00000000000..137de85ac37 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_ref_in_property_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.ref_in_property import RefInProperty + +_path = '/responseBody/postRefInPropertyResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RefInProperty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRefInPropertyResponseBodyForContentTypes(api_client.Api): + + def post_ref_in_property_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_required_default_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_required_default_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..92697cb7a01 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_required_default_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.required_default_validation import RequiredDefaultValidation + +_path = '/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RequiredDefaultValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRequiredDefaultValidationResponseBodyForContentTypes(api_client.Api): + + def post_required_default_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_required_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_required_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..05b8971f8d9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_required_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.required_validation import RequiredValidation + +_path = '/responseBody/postRequiredValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RequiredValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRequiredValidationResponseBodyForContentTypes(api_client.Api): + + def post_required_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_required_with_empty_array_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_required_with_empty_array_response_body_for_content_types.py new file mode 100644 index 00000000000..6c8cb2775b2 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_required_with_empty_array_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray + +_path = '/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = RequiredWithEmptyArray + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostRequiredWithEmptyArrayResponseBodyForContentTypes(api_client.Api): + + def post_required_with_empty_array_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_simple_enum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_simple_enum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..261f620249c --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_simple_enum_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.simple_enum_validation import SimpleEnumValidation + +_path = '/responseBody/postSimpleEnumValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = SimpleEnumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostSimpleEnumValidationResponseBodyForContentTypes(api_client.Api): + + def post_simple_enum_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_string_type_matches_strings_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_string_type_matches_strings_response_body_for_content_types.py new file mode 100644 index 00000000000..6625a4db867 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_string_type_matches_strings_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = StrSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostStringTypeMatchesStringsResponseBodyForContentTypes(api_client.Api): + + def post_string_type_matches_strings_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py new file mode 100644 index 00000000000..8909c59b712 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing + +_path = '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(api_client.Api): + + def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uniqueitems_false_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uniqueitems_false_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..427b8787740 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uniqueitems_false_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation + +_path = '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = UniqueitemsFalseValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUniqueitemsFalseValidationResponseBodyForContentTypes(api_client.Api): + + def post_uniqueitems_false_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uniqueitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uniqueitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..937ad878ce9 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uniqueitems_validation_response_body_for_content_types.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation + +_path = '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = UniqueitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUniqueitemsValidationResponseBodyForContentTypes(api_client.Api): + + def post_uniqueitems_validation_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uri_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uri_format_response_body_for_content_types.py new file mode 100644 index 00000000000..9b2e9b27c5f --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uri_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postUriFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUriFormatResponseBodyForContentTypes(api_client.Api): + + def post_uri_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uri_reference_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uri_reference_format_response_body_for_content_types.py new file mode 100644 index 00000000000..8dc0f82ca0f --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uri_reference_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postUriReferenceFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUriReferenceFormatResponseBodyForContentTypes(api_client.Api): + + def post_uri_reference_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uri_template_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uri_template_format_response_body_for_content_types.py new file mode 100644 index 00000000000..155d57fdb34 --- /dev/null +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/api/response_content_content_type_schema_api_endpoints/post_uri_template_format_response_body_for_content_types.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +import functools # noqa: F401 +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import api_client, exceptions +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from unit_test_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + Configuration, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + Int32Base, + Int64Base, + Float32Base, + Float64Base, + NumberBase, + UUIDBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + NoneClass, + BoolClass, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/responseBody/postUriTemplateFormatResponseBodyForContentTypes' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class PostUriTemplateFormatResponseBodyForContentTypes(api_client.Api): + + def post_uri_template_format_response_body_for_content_types( + self: api_client.Api, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = _path + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/__init__.py index 394c607b7ee..69f857ef1bf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/apis/__init__.py @@ -7,7 +7,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from unit_test_api.api.json_api import JsonApi +# from unit_test_api.api.content_type_json_api import ContentTypeJsonApi # # or import this package, but before doing it, use: # @@ -15,6 +15,7 @@ # sys.setrecursionlimit(n) # Import APIs into API package: -from unit_test_api.api.json_api import JsonApi -from unit_test_api.api.post_api import PostApi -from unit_test_api.api.request_body_api import RequestBodyApi +from unit_test_api.api.content_type_json_api import ContentTypeJsonApi +from unit_test_api.api.operation_request_body_api import OperationRequestBodyApi +from unit_test_api.api.path_post_api import PathPostApi +from unit_test_api.api.response_content_content_type_schema_api import ResponseContentContentTypeSchemaApi diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/schemas.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/schemas.py index 9b6e7f23593..a9aaf937372 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/schemas.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/schemas.py @@ -1109,9 +1109,6 @@ class DictBase(Discriminable): ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes ApiTypeError: when the input type is not in the list of allowed spec types """ - if isinstance(arg, cls): - # an instance of the correct type was passed in - return {} _path_to_schemas = super()._validate(arg, validation_metadata=validation_metadata) if not isinstance(arg, frozendict): return _path_to_schemas @@ -1662,18 +1659,6 @@ class ComposedBase(Discriminable): ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes ApiTypeError: when the input type is not in the list of allowed spec types """ - if isinstance(arg, Schema) and validation_metadata.from_server is False: - if isinstance(arg, cls): - # an instance of the correct type was passed in - return {} - raise ApiTypeError( - 'Incorrect type passed in, required type was {} and passed type was {} at {}'.format( - cls, - type(arg), - validation_metadata.path_to_item - ) - ) - # validation checking on types, validations, and enums path_to_schemas = super()._validate(arg, validation_metadata=validation_metadata) @@ -2105,43 +2090,6 @@ class DictSchema( schema_type_classes = set([NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema]) -def deserialize_file(response_data, configuration, content_disposition=None): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - Args: - param response_data (str): the file data to write - configuration (Configuration): the instance to use to convert files - - Keyword Args: - content_disposition (str): the value of the Content-Disposition - header - - Returns: - (file_type): the deserialized file which is open - The user is responsible for closing and reading the file - """ - fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - - f = open(path, "rb") - return f - - @functools.cache def get_new_class( class_name: str, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py index b4237d1d949..0119b9d1f26 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py @@ -1109,9 +1109,6 @@ class DictBase(Discriminable): ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes ApiTypeError: when the input type is not in the list of allowed spec types """ - if isinstance(arg, cls): - # an instance of the correct type was passed in - return {} _path_to_schemas = super()._validate(arg, validation_metadata=validation_metadata) if not isinstance(arg, frozendict): return _path_to_schemas @@ -1662,18 +1659,6 @@ class ComposedBase(Discriminable): ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes ApiTypeError: when the input type is not in the list of allowed spec types """ - if isinstance(arg, Schema) and validation_metadata.from_server is False: - if isinstance(arg, cls): - # an instance of the correct type was passed in - return {} - raise ApiTypeError( - 'Incorrect type passed in, required type was {} and passed type was {} at {}'.format( - cls, - type(arg), - validation_metadata.path_to_item - ) - ) - # validation checking on types, validations, and enums path_to_schemas = super()._validate(arg, validation_metadata=validation_metadata) @@ -2105,43 +2090,6 @@ class DictSchema( schema_type_classes = set([NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema]) -def deserialize_file(response_data, configuration, content_disposition=None): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - Args: - param response_data (str): the file data to write - configuration (Configuration): the instance to use to convert files - - Keyword Args: - content_disposition (str): the value of the Content-Disposition - header - - Returns: - (file_type): the deserialized file which is open - The user is responsible for closing and reading the file - """ - fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - - f = open(path, "rb") - return f - - @functools.cache def get_new_class( class_name: str, diff --git a/samples/openapi3/client/petstore/python-experimental/test/__init__.py b/samples/openapi3/client/petstore/python-experimental/test/__init__.py index 2d2e1b5c730..3d592080805 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/__init__.py +++ b/samples/openapi3/client/petstore/python-experimental/test/__init__.py @@ -16,8 +16,8 @@ class ApiTestMixin: url: str, method: str = 'POST', body: typing.Optional[bytes] = None, - content_type: typing.Optional[str] = 'application/json', - accept_content_type: typing.Optional[str] = 'application/json', + content_type: typing.Optional[str] = None, + accept_content_type: typing.Optional[str] = None, stream: bool = False, ): headers = {