From 57f5cc4000aa90c44a382956927dd24599c81927 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 3 Oct 2022 11:15:16 -0700 Subject: [PATCH] [python] fixes bugs (#13581) * Adds bug fixes * Samples and docs regenerated * Samples regenerated --- docs/generators/python.md | 1 + .../codegen/CodegenConstants.java | 11 + .../languages/PythonClientCodegen.java | 163 ++++++++----- .../resources/python/README_common.handlebars | 2 +- .../resources/python/api_client.handlebars | 2 +- .../main/resources/python/endpoint.handlebars | 12 - .../resources/python/model_doc.handlebars | 2 +- .../composed_schemas.handlebars | 2 +- .../model_templates/dict_partial.handlebars | 2 +- .../main/resources/python/schemas.handlebars | 45 +++- .../codegen/python/PythonClientTest.java | 91 ++++++- .../src/test/resources/3_0/11_regex.yaml | 27 +++ ...odels-for-testing-with-http-signature.yaml | 23 +- .../client/3_0_3_unit_test/python/README.md | 2 +- .../python/unit_test_api/api_client.py | 2 +- .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 21 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../post.pyi | 18 ++ .../python/unit_test_api/schemas.py | 5 +- .../features/dynamic-servers/python/README.md | 2 +- .../python/dynamic_servers/api_client.py | 2 +- .../dynamic_servers/paths/custom/get.pyi | 18 ++ .../dynamic_servers/paths/default/get.pyi | 18 ++ .../python/dynamic_servers/schemas.py | 5 +- .../petstore/python/.openapi-generator/FILES | 6 + .../openapi3/client/petstore/python/README.md | 4 +- .../petstore/python/docs/apis/tags/FakeApi.md | 4 +- .../petstore/python/docs/models/FromSchema.md | 16 ++ .../ObjectWithInvalidNamedRefedProperties.md | 16 ++ .../python/petstore_api/api_client.py | 2 +- .../python/petstore_api/model/from_schema.py | 88 +++++++ .../python/petstore_api/model/from_schema.pyi | 88 +++++++ ...ect_with_invalid_named_refed_properties.py | 98 ++++++++ ...ct_with_invalid_named_refed_properties.pyi | 98 ++++++++ .../python/petstore_api/models/__init__.py | 2 + .../paths/another_fake_dummy/patch.pyi | 27 +++ .../python/petstore_api/paths/fake/delete.pyi | 89 +++++++ .../python/petstore_api/paths/fake/get.pyi | 106 +++++++++ .../python/petstore_api/paths/fake/patch.pyi | 27 +++ .../python/petstore_api/paths/fake/post.pyi | 32 +++ .../get.pyi | 26 ++ .../paths/fake_body_with_file_schema/put.pyi | 21 ++ .../paths/fake_body_with_query_params/put.pyi | 46 ++++ .../paths/fake_case_sensitive_params/put.pyi | 53 +++++ .../paths/fake_classname_test/patch.pyi | 27 +++ .../paths/fake_delete_coffee_id/delete.pyi | 48 ++++ .../petstore_api/paths/fake_health/get.pyi | 18 ++ .../post.pyi | 21 ++ .../paths/fake_inline_composition_/post.pyi | 62 +++++ .../paths/fake_json_form_data/get.pyi | 20 ++ .../paths/fake_json_patch/patch.pyi | 20 ++ .../paths/fake_json_with_charset/post.pyi | 26 ++ .../paths/fake_obj_in_query/get.pyi | 36 +++ .../post.pyi | 223 ++++++++++++++++++ .../post.pyi | 50 ++++ .../paths/fake_ref_obj_in_query/get.pyi | 36 +++ .../paths/fake_refs_array_of_enums/post.pyi | 26 ++ .../paths/fake_refs_arraymodel/post.pyi | 26 ++ .../paths/fake_refs_boolean/post.pyi | 26 ++ .../post.pyi | 26 ++ .../paths/fake_refs_enum/post.pyi | 26 ++ .../paths/fake_refs_mammal/post.pyi | 27 +++ .../paths/fake_refs_number/post.pyi | 26 ++ .../post.pyi | 26 ++ .../paths/fake_refs_string/post.pyi | 26 ++ .../fake_response_without_schema/get.pyi | 19 ++ .../paths/fake_test_query_paramters/put.pyi | 74 ++++++ .../paths/fake_upload_download_file/post.pyi | 27 +++ .../paths/fake_upload_file/post.pyi | 26 ++ .../paths/fake_upload_files/post.pyi | 26 ++ .../python/petstore_api/paths/foo/get.pyi | 18 ++ .../python/petstore_api/paths/pet/post.pyi | 35 +++ .../python/petstore_api/paths/pet/put.pyi | 47 ++++ .../paths/pet_find_by_status/get.pyi | 57 +++++ .../paths/pet_find_by_tags/get.pyi | 57 +++++ .../petstore_api/paths/pet_pet_id/delete.pyi | 59 +++++ .../petstore_api/paths/pet_pet_id/get.pyi | 69 ++++++ .../petstore_api/paths/pet_pet_id/post.pyi | 44 ++++ .../paths/pet_pet_id_upload_image/post.pyi | 50 ++++ .../paths/store_inventory/get.pyi | 18 ++ .../petstore_api/paths/store_order/post.pyi | 42 ++++ .../paths/store_order_order_id/delete.pyi | 48 ++++ .../paths/store_order_order_id/get.pyi | 69 ++++++ .../python/petstore_api/paths/user/post.pyi | 21 ++ .../paths/user_create_with_array/post.pyi | 21 ++ .../paths/user_create_with_list/post.pyi | 21 ++ .../petstore_api/paths/user_login/get.pyi | 77 ++++++ .../petstore_api/paths/user_logout/get.pyi | 12 + .../paths/user_username/delete.pyi | 48 ++++ .../petstore_api/paths/user_username/get.pyi | 69 ++++++ .../petstore_api/paths/user_username/put.pyi | 57 +++++ .../petstore/python/petstore_api/schemas.py | 5 +- .../test/test_models/test_from_schema.py | 25 ++ ...ect_with_invalid_named_refed_properties.py | 25 ++ .../petstore/python/tests_manual/__init__.py | 7 +- ...ect_with_invalid_named_refed_properties.py | 77 ++++++ .../tests_manual/test_paths/__init__.py | 0 .../test_paths/test_pet_pet_id/__init__.py | 0 .../test_paths/test_pet_pet_id/test_get.py | 75 ++++++ 270 files changed, 6730 insertions(+), 96 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/11_regex.yaml create mode 100644 samples/openapi3/client/petstore/python/docs/models/FromSchema.md create mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectWithInvalidNamedRefedProperties.md create mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi create mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi create mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_from_schema.py create mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_with_invalid_named_refed_properties.py create mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py create mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/__init__.py create mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/__init__.py create mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py diff --git a/docs/generators/python.md b/docs/generators/python.md index b20cce0a65be..4cbf616d0917 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -22,6 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |library|library template (sub-template) to use: urllib3| |urllib3| +|nonCompliantUseDiscriminatorIfCompositionFails|When true, If the payload fails to validate against composed schemas (allOf/anyOf/oneOf/not) and a discriminator is present, then ignore the composition validation errors and attempt to use the discriminator to validate the payload.<br />Note: setting this to true makes the generated client not comply with json schema because it ignores composition validation errors. Please consider making your schemas more restrictive rather than setting this to true. You can do that by:<ul><li>defining the propertyName as an enum with only one value in the schemas that are in your discriminator map</li><li>setting additionalProperties: false in your schemas</li></ul>|
**true**
If composition fails and a discriminator exists, the composition errors will be ignored and validation will be attempted with the discriminator
**false**
Composition validation must succeed. Discriminator validation must succeed.
|false| |packageName|python package name (convention: snake_case).| |openapi_client| |packageUrl|python package URL.| |null| |packageVersion|python package version.| |1.0.0| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index 9e576655bfba..2ee0c5474f8e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -404,4 +404,15 @@ public class CodegenConstants { public static final String ERROR_OBJECT_TYPE = "errorObjectType"; + public static final String NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS = "nonCompliantUseDiscriminatorIfCompositionFails"; + + public static final String NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS_DESC = + "When true, If the payload fails to validate against composed schemas (allOf/anyOf/oneOf/not) and a " + + "discriminator is present, then ignore the composition validation errors and attempt to use the " + + "discriminator to validate the payload.
" + + "Note: setting this to true makes the generated client not comply with json schema because it ignores " + + "composition validation errors. Please consider making your schemas more restrictive rather than " + + "setting this to true. You can do that by:"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 9eaa5fbfaa68..8dcd19c2eb5d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -105,6 +105,8 @@ public class PythonClientCodegen extends AbstractPythonCodegen { // for apis.tags tag api definition private Map tagEnumToApiClassname = new LinkedHashMap<>(); + private boolean nonCompliantUseDiscrIfCompositionFails = false; + public PythonClientCodegen() { super(); loadDeepObjectIntoItems = false; @@ -215,6 +217,13 @@ public class PythonClientCodegen extends AbstractPythonCodegen { cliOptions.add(new CliOption(RECURSION_LIMIT, "Set the recursion limit. If not set, use the system default value.")); cliOptions.add(CliOption.newBoolean(USE_INLINE_MODEL_RESOLVER, "use the inline model resolver, if true inline complex models will be extracted into components and $refs to them will be used"). defaultValue(Boolean.FALSE.toString())); + CliOption nonCompliantUseDiscrIfCompositionFails = CliOption.newBoolean(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS, CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS_DESC); + Map nonCompliantUseDiscrIfCompositionFailsOpts = new HashMap<>(); + nonCompliantUseDiscrIfCompositionFailsOpts.put("true", "If composition fails and a discriminator exists, the composition errors will be ignored and validation will be attempted with the discriminator"); + nonCompliantUseDiscrIfCompositionFailsOpts.put("false", "Composition validation must succeed. Discriminator validation must succeed."); + nonCompliantUseDiscrIfCompositionFails.setEnum(nonCompliantUseDiscrIfCompositionFailsOpts); + + cliOptions.add(nonCompliantUseDiscrIfCompositionFails); supportedLibraries.put("urllib3", "urllib3-based client"); CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use: urllib3"); @@ -363,6 +372,12 @@ public class PythonClientCodegen extends AbstractPythonCodegen { } } + if (additionalProperties.containsKey(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS)) { + nonCompliantUseDiscrIfCompositionFails = Boolean.parseBoolean( + additionalProperties.get(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS).toString() + ); + } + String readmePath = "README.md"; String readmeTemplate = "README." + templateExtension; if (generateSourceCodeOnly) { @@ -479,13 +494,13 @@ public class PythonClientCodegen extends AbstractPythonCodegen { return apiFileFolder() + File.separator + toApiFilename(tag) + suffix; } - private void generateFiles(List> processTemplateToFileInfos, String skippedByOption) { + private void generateFiles(List> processTemplateToFileInfos, boolean shouldGenerate, String skippedByOption) { for (List processTemplateToFileInfo: processTemplateToFileInfos) { Map templateData = (Map) processTemplateToFileInfo.get(0); String templateName = (String) processTemplateToFileInfo.get(1); String outputFilename = (String) processTemplateToFileInfo.get(2); try { - processTemplateToFile(templateData, templateName, outputFilename, true, skippedByOption); + processTemplateToFile(templateData, templateName, outputFilename, shouldGenerate, skippedByOption); } catch (IOException e) { LOGGER.error("Error when writing template file {}", e.toString()); } @@ -649,9 +664,11 @@ public class PythonClientCodegen extends AbstractPythonCodegen { outputFilename = packageFilename(Arrays.asList("apis", "paths", pathModule + ".py")); apisFiles.add(Arrays.asList(operationMap, "apis_path_module.handlebars", outputFilename)); } - generateFiles(pathsFiles, CodegenConstants.APIS); - generateFiles(apisFiles, CodegenConstants.APIS); - generateFiles(testFiles, CodegenConstants.API_TESTS); + boolean shouldGenerateApis = (boolean) additionalProperties().get(CodegenConstants.GENERATE_APIS); + boolean shouldGenerateApiTests = (boolean) additionalProperties().get(CodegenConstants.GENERATE_API_TESTS); + generateFiles(pathsFiles, shouldGenerateApis, CodegenConstants.APIS); + generateFiles(apisFiles, shouldGenerateApis, CodegenConstants.APIS); + generateFiles(testFiles, shouldGenerateApiTests, CodegenConstants.API_TESTS); } /* @@ -1024,7 +1041,9 @@ public class PythonClientCodegen extends AbstractPythonCodegen { cp.isNullable = false; cp.setHasMultipleTypes(true); } - postProcessPattern(cp.pattern, cp.vendorExtensions); + if (p.getPattern() != null) { + postProcessPattern(p.getPattern(), cp.vendorExtensions); + } // if we have a property that has a difficult name, either: // 1. name is reserved, like class int float // 2. name is invalid in python like '3rd' or 'Content-Type' @@ -1468,7 +1487,11 @@ public class PythonClientCodegen extends AbstractPythonCodegen { @Override public CodegenModel fromModel(String name, Schema sc) { CodegenModel cm = super.fromModel(name, sc); - + if (sc.getPattern() != null) { + postProcessPattern(sc.getPattern(), cm.vendorExtensions); + String pattern = (String) cm.vendorExtensions.get("x-regex"); + cm.setPattern(pattern); + } if (cm.isNullable) { cm.setIsNull(true); cm.isNullable = false; @@ -1874,34 +1897,21 @@ public class PythonClientCodegen extends AbstractPythonCodegen { example = "2"; } else if (StringUtils.isNotBlank(schema.getPattern())) { String pattern = schema.getPattern(); + List results = getPatternAndModifiers(pattern); + String extractedPattern = (String) results.get(0); + List regexFlags = (List) results.get(1); /* RxGen does not support our ECMA dialect https://github.com/curious-odd-man/RgxGen/issues/56 So strip off the leading / and trailing / and turn on ignore case if we have it */ - Pattern valueExtractor = Pattern.compile("^/?(.+?)/?(.?)$"); - Matcher m = valueExtractor.matcher(pattern); RgxGen rgxGen = null; - if (m.find()) { - int groupCount = m.groupCount(); - if (groupCount == 1) { - // only pattern found - String isolatedPattern = m.group(1); - rgxGen = new RgxGen(isolatedPattern); - } else if (groupCount == 2) { - // patterns and flag found - String isolatedPattern = m.group(1); - String flags = m.group(2); - if (flags.contains("i")) { - rgxGen = new RgxGen(isolatedPattern); - RgxGenProperties properties = new RgxGenProperties(); - RgxGenOption.CASE_INSENSITIVE.setInProperties(properties, true); - rgxGen.setProperties(properties); - } else { - rgxGen = new RgxGen(isolatedPattern); - } - } + if (regexFlags.size() > 0 && regexFlags.contains("i")) { + rgxGen = new RgxGen(extractedPattern); + RgxGenProperties properties = new RgxGenProperties(); + RgxGenOption.CASE_INSENSITIVE.setInProperties(properties, true); + rgxGen.setProperties(properties); } else { - rgxGen = new RgxGen(pattern); + rgxGen = new RgxGen(extractedPattern); } // this seed makes it so if we have [a-z] we pick a @@ -2083,12 +2093,12 @@ public class PythonClientCodegen extends AbstractPythonCodegen { } example += toExampleValueRecursive(propModelName, - propSchema, - propExample, - indentationLevel + 1, - propName + "=", - exampleLine + 1, - includedSchemas) + ",\n"; + propSchema, + propExample, + indentationLevel + 1, + propName + "=", + exampleLine + 1, + includedSchemas) + ",\n"; } // TODO handle additionalProperties also @@ -2341,6 +2351,16 @@ public class PythonClientCodegen extends AbstractPythonCodegen { property.pattern = toRegularExpression(p.getPattern()); } + @Override + public String toRegularExpression(String pattern) { + if (pattern == null) { + return null; + } + List results = getPatternAndModifiers(pattern); + String extractedPattern = (String) results.get(0); + return extractedPattern; + } + protected void updatePropertyForNumber(CodegenProperty property, Schema p) { property.setIsNumber(true); // float and double differentiation is determined with format info @@ -2465,6 +2485,46 @@ public class PythonClientCodegen extends AbstractPythonCodegen { return postProcessModelsEnum(objs); } + /** + * @param pattern the regex pattern + * @return List> + */ + private List getPatternAndModifiers(String pattern) { + /* + Notes: + RxGen does not support our ECMA dialect https://github.com/curious-odd-man/RgxGen/issues/56 + So strip off the leading / and trailing / and turn on ignore case if we have it + + json schema test cases omit the leading and trailing /s, so make sure that the regex allows that + */ + Pattern valueExtractor = Pattern.compile("^/?(.+?)/?([simu]{0,4})$"); + Matcher m = valueExtractor.matcher(pattern); + if (m.find()) { + int groupCount = m.groupCount(); + if (groupCount == 1) { + // only pattern found + String isolatedPattern = m.group(1); + return Arrays.asList(isolatedPattern, null); + } else if (groupCount == 2) { + List modifiers = new ArrayList(); + // patterns and flag found + String isolatedPattern = m.group(1); + String flags = m.group(2); + if (flags.contains("s")) { + modifiers.add("DOTALL"); + } + if (flags.contains("i")) { + modifiers.add("IGNORECASE"); + } + if (flags.contains("m")) { + modifiers.add("MULTILINE"); + } + return Arrays.asList(isolatedPattern, modifiers); + } + } + return Arrays.asList(pattern, new ArrayList()); + } + /* * The OpenAPI pattern spec follows the Perl convention and style of modifiers. Python * does not support this in as natural a way so it needs to convert it. See @@ -2472,28 +2532,14 @@ public class PythonClientCodegen extends AbstractPythonCodegen { */ public void postProcessPattern(String pattern, Map vendorExtensions) { if (pattern != null) { - int regexLength = pattern.length(); - String regex = pattern; - int i = pattern.lastIndexOf('/'); - if (regexLength >= 2 && pattern.charAt(0) == '/' && i != -1) { - // json schema tests do not include the leading and trailing slashes - // so I do not think that they are required - regex = pattern.substring(1, i); - } - regex = regex.replace("'", "\\'"); - List modifiers = new ArrayList(); + List results = getPatternAndModifiers(pattern); + String extractedPattern = (String) results.get(0); + List modifiers = (List) results.get(1); - if (i != -1) { - for (char c : pattern.substring(i).toCharArray()) { - if (regexModifiers.containsKey(c)) { - String modifier = regexModifiers.get(c); - modifiers.add(modifier); - } - } + vendorExtensions.put("x-regex", extractedPattern); + if (modifiers.size() > 0) { + vendorExtensions.put("x-modifiers", modifiers); } - - vendorExtensions.put("x-regex", regex); - vendorExtensions.put("x-modifiers", modifiers); } } @@ -2723,6 +2769,11 @@ public class PythonClientCodegen extends AbstractPythonCodegen { return tag; } + public Map postProcessSupportingFileData(Map objs) { + objs.put(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS, nonCompliantUseDiscrIfCompositionFails); + return objs; + } + @Override public void postProcess() { System.out.println("################################################################################"); @@ -2734,4 +2785,4 @@ public class PythonClientCodegen extends AbstractPythonCodegen { System.out.println("# Please support his work directly via https://github.com/sponsors/spacether \uD83D\uDE4F#"); System.out.println("################################################################################"); } -} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/README_common.handlebars b/modules/openapi-generator/src/main/resources/python/README_common.handlebars index a0c7bac3e16a..bb33cc728d58 100644 --- a/modules/openapi-generator/src/main/resources/python/README_common.handlebars +++ b/modules/openapi-generator/src/main/resources/python/README_common.handlebars @@ -6,7 +6,7 @@ from pprint import pprint {{#with apiInfo}} {{#each apis}} {{#if @first}} -from {{packageName}}.{{apiPackage}} import {{classFilename}} +from {{packageName}}.{{apiPackage}}.tags import {{classFilename}} {{#each imports}} {{{import}}} {{/each}} diff --git a/modules/openapi-generator/src/main/resources/python/api_client.handlebars b/modules/openapi-generator/src/main/resources/python/api_client.handlebars index d67e7e3d575d..1bf13aaa303d 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.handlebars +++ b/modules/openapi-generator/src/main/resources/python/api_client.handlebars @@ -1047,7 +1047,7 @@ class ApiClient: ) -> urllib3.HTTPResponse: # header parameters - headers = headers or {} + headers = headers or HTTPHeaderDict() headers.update(self.default_headers) if self.cookie: headers['Cookie'] = self.cookie diff --git a/modules/openapi-generator/src/main/resources/python/endpoint.handlebars b/modules/openapi-generator/src/main/resources/python/endpoint.handlebars index c7c81d8acdba..71eb358b5741 100644 --- a/modules/openapi-generator/src/main/resources/python/endpoint.handlebars +++ b/modules/openapi-generator/src/main/resources/python/endpoint.handlebars @@ -27,7 +27,6 @@ from . import path {{> model_templates/schema }} {{/with}} {{/each}} -{{#unless isStub}} RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { @@ -58,7 +57,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) {{#each queryParams}} {{> endpoint_parameter }} {{/each}} -{{/unless}} {{/if}} {{#if headerParams}} # header params @@ -67,7 +65,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) {{> model_templates/schema }} {{/with}} {{/each}} -{{#unless isStub}} RequestRequiredHeaderParams = typing_extensions.TypedDict( 'RequestRequiredHeaderParams', { @@ -98,7 +95,6 @@ class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderPara {{#each headerParams}} {{> endpoint_parameter }} {{/each}} -{{/unless}} {{/if}} {{#if pathParams}} # path params @@ -107,7 +103,6 @@ class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderPara {{> model_templates/schema }} {{/with}} {{/each}} -{{#unless isStub}} RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', { @@ -138,7 +133,6 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): {{#each pathParams}} {{> endpoint_parameter }} {{/each}} -{{/unless}} {{/if}} {{#if cookieParams}} # cookie params @@ -147,7 +141,6 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): {{> model_templates/schema }} {{/with}} {{/each}} -{{#unless isStub}} RequestRequiredCookieParams = typing_extensions.TypedDict( 'RequestRequiredCookieParams', { @@ -178,7 +171,6 @@ class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookiePara {{#each cookieParams}} {{> endpoint_parameter }} {{/each}} -{{/unless}} {{/if}} {{#with bodyParam}} # body param @@ -187,7 +179,6 @@ class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookiePara {{> model_templates/schema }} {{/with}} {{/each}} -{{#unless isStub}} request_body_{{paramName}} = api_client.RequestBody( @@ -201,7 +192,6 @@ request_body_{{paramName}} = api_client.RequestBody( required=True, {{/if}} ) -{{/unless}} {{/with}} {{#unless isStub}} {{#each authMethods}} @@ -277,7 +267,6 @@ _servers = ( {{> model_templates/schema }} {{/with}} {{/each}} -{{#unless isStub}} {{#if responseHeaders}} ResponseHeadersFor{{code}} = typing_extensions.TypedDict( 'ResponseHeadersFor{{code}}', @@ -360,7 +349,6 @@ _response_for_{{code}} = api_client.OpenApiResponse( ] {{/if}} ) -{{/unless}} {{/each}} {{#unless isStub}} _status_code_to_response = { diff --git a/modules/openapi-generator/src/main/resources/python/model_doc.handlebars b/modules/openapi-generator/src/main/resources/python/model_doc.handlebars index 9d8c70e4f926..ae96a37f4292 100644 --- a/modules/openapi-generator/src/main/resources/python/model_doc.handlebars +++ b/modules/openapi-generator/src/main/resources/python/model_doc.handlebars @@ -1,7 +1,7 @@ {{#each models}} {{#with model}} # {{packageName}}.{{modelPackage}}.{{classFilename}}.{{classname}} -{{> schema_doc }} +{{> schema_doc complexTypePrefix="" }} {{/with}} {{/each}} diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/composed_schemas.handlebars b/modules/openapi-generator/src/main/resources/python/model_templates/composed_schemas.handlebars index 0c9264e1b14a..9deb056577d9 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/composed_schemas.handlebars +++ b/modules/openapi-generator/src/main/resources/python/model_templates/composed_schemas.handlebars @@ -99,7 +99,7 @@ def any_of(cls): {{#if complexType}} @staticmethod -def {{baseName}}() -> typing.Type['{{complexType}}']: +def {{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}() -> typing.Type['{{complexType}}']: return {{complexType}} {{else}} {{> model_templates/schema }} diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/dict_partial.handlebars b/modules/openapi-generator/src/main/resources/python/model_templates/dict_partial.handlebars index e5803340e437..9ff3e7c37ea7 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/dict_partial.handlebars +++ b/modules/openapi-generator/src/main/resources/python/model_templates/dict_partial.handlebars @@ -30,7 +30,7 @@ class properties: {{#if complexType}} @staticmethod - def {{baseName}}() -> typing.Type['{{complexType}}']: + def {{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}() -> typing.Type['{{complexType}}']: return {{complexType}} {{else}} {{> model_templates/schema }} diff --git a/modules/openapi-generator/src/main/resources/python/schemas.handlebars b/modules/openapi-generator/src/main/resources/python/schemas.handlebars index c251e24552c0..e61dd99ac708 100644 --- a/modules/openapi-generator/src/main/resources/python/schemas.handlebars +++ b/modules/openapi-generator/src/main/resources/python/schemas.handlebars @@ -1863,19 +1863,44 @@ class ComposedBase(Discriminable): path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) except (ApiValueError, ApiTypeError) as ex: if discriminated_cls is not None and oneof_cls is discriminated_cls: + {{#if nonCompliantUseDiscriminatorIfCompositionFails}} + """ + suppress exception because code was generated with + nonCompliantUseDiscriminatorIfCompositionFails=true + """ + pass + {{else}} raise ex + {{/if}} continue oneof_classes.append(oneof_cls) if not oneof_classes: + {{#if nonCompliantUseDiscriminatorIfCompositionFails}} + if discriminated_cls: + """ + return without exception because code was generated with + nonCompliantUseDiscriminatorIfCompositionFails=true + """ + return {} + {{/if}} raise ApiValueError( "Invalid inputs given to generate an instance of {}. None " "of the oneOf schemas matched the input data.".format(cls) ) elif len(oneof_classes) > 1: + {{#if nonCompliantUseDiscriminatorIfCompositionFails}} + if discriminated_cls: + """ + return without exception because code was generated with + nonCompliantUseDiscriminatorIfCompositionFails=true + """ + return {} + {{/if}} raise ApiValueError( "Invalid inputs given to generate an instance of {}. Multiple " "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) ) + # exactly one class matches return path_to_schemas @classmethod @@ -1896,11 +1921,27 @@ class ComposedBase(Discriminable): other_path_to_schemas = anyof_cls._validate_oapg(arg, validation_metadata=validation_metadata) except (ApiValueError, ApiTypeError) as ex: if discriminated_cls is not None and anyof_cls is discriminated_cls: + {{#if nonCompliantUseDiscriminatorIfCompositionFails}} + """ + suppress exception because code was generated with + nonCompliantUseDiscriminatorIfCompositionFails=true + """ + pass + {{else}} raise ex + {{/if}} continue anyof_classes.append(anyof_cls) update(path_to_schemas, other_path_to_schemas) if not anyof_classes: + {{#if nonCompliantUseDiscriminatorIfCompositionFails}} + if discriminated_cls: + """ + return without exception because code was generated with + nonCompliantUseDiscriminatorIfCompositionFails=true + """ + return {} + {{/if}} raise ApiValueError( "Invalid inputs given to generate an instance of {}. None " "of the anyOf schemas matched the input data.".format(cls) @@ -1940,7 +1981,9 @@ class ComposedBase(Discriminable): ) # process composed schema - discriminator = getattr(cls, 'discriminator', None) + discriminator = None + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): + discriminator = cls.MetaOapg.discriminator() discriminated_cls = None if discriminator and arg and isinstance(arg, frozendict.frozendict): disc_property_name = list(discriminator.keys())[0] diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java index 56b5d92a79a7..47e5569c7124 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java @@ -21,13 +21,21 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.*; import org.openapitools.codegen.*; +import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.languages.PythonClientCodegen; import org.openapitools.codegen.utils.ModelUtils; import org.testng.Assert; import org.testng.annotations.Test; +import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; @SuppressWarnings("static-method") public class PythonClientTest { @@ -78,8 +86,8 @@ public class PythonClientTest { public void testRecursiveGeoJsonExampleWhenTypeIsGeoJsonGeometry() throws IOException { testEndpointExampleValue("/geojson", - "src/test/resources/3_0/issue_13043_recursive_model.yaml", - "3_0/issue_13043_recursive_model_expected_value.txt"); + "src/test/resources/3_0/issue_13043_recursive_model.yaml", + "3_0/issue_13043_recursive_model_expected_value.txt"); } @@ -88,8 +96,8 @@ public class PythonClientTest { public void testRecursiveGeoJsonExampleWhenTypeIsGeometryCollection() throws IOException { testEndpointExampleValue("/geojson_geometry_collection", - "src/test/resources/3_0/issue_13043_recursive_model.yaml", - "3_0/issue_13043_geometry_collection_expected_value.txt"); + "src/test/resources/3_0/issue_13043_recursive_model.yaml", + "3_0/issue_13043_geometry_collection_expected_value.txt"); } @@ -116,4 +124,77 @@ public class PythonClientTest { } -} + @Test + public void testApiTestsNotGenerated() throws Exception { + File output = Files.createTempDirectory("test").toFile(); + + Map globalProperties = Collections.singletonMap("apiTests", "false"); + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGlobalProperties(globalProperties) + .setGeneratorName("python") + .setInputSpec("src/test/resources/3_0/petstore.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(clientOptInput).generate(); + Assert.assertTrue(files.size() > 0); + + Path pathThatShouldNotExist = output.toPath().resolve("openapi_client/test/test_paths"); + Assert.assertFalse(Files.isDirectory(pathThatShouldNotExist)); + output.deleteOnExit(); + } + + @Test + public void testApisNotGenerated() throws Exception { + File output = Files.createTempDirectory("test").toFile(); + + Map globalProperties = Collections.singletonMap("models", ""); + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGlobalProperties(globalProperties) + .setGeneratorName("python") + .setInputSpec("src/test/resources/3_0/petstore.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(clientOptInput).generate(); + Assert.assertTrue(files.size() > 0); + + Path pathThatShouldNotExist = output.toPath().resolve("openapi_client/paths"); + Assert.assertFalse(Files.isDirectory(pathThatShouldNotExist)); + output.deleteOnExit(); + } + + @Test + public void testRegexWithoutTrailingSlashWorks() { + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/11_regex.yaml"); + PythonClientCodegen codegen = new PythonClientCodegen(); + codegen.setOpenAPI(openAPI); + + String modelName = "UUID"; + Schema schema = openAPI.getComponents().getSchemas().get(modelName); + + CodegenModel cm = codegen.fromModel(modelName, schema); + String expectedRegexPattern = "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"; + Assert.assertEquals(cm.getPattern(), expectedRegexPattern); + Assert.assertEquals(cm.vendorExtensions.get("x-regex"), expectedRegexPattern); + Assert.assertFalse(cm.vendorExtensions.containsKey("x-modifiers")); + } + + @Test + public void testRegexWithMultipleFlagsWorks() { + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/11_regex.yaml"); + PythonClientCodegen codegen = new PythonClientCodegen(); + codegen.setOpenAPI(openAPI); + + String modelName = "StringWithRegexWithThreeFlags"; + Schema schema = openAPI.getComponents().getSchemas().get(modelName); + + CodegenModel cm = codegen.fromModel(modelName, schema); + String expectedRegexPattern = "a."; + Assert.assertEquals(cm.getPattern(), expectedRegexPattern); + Assert.assertEquals(cm.vendorExtensions.get("x-regex"), expectedRegexPattern); + Assert.assertEquals(cm.vendorExtensions.get("x-modifiers"), Arrays.asList("DOTALL", "IGNORECASE", "MULTILINE")); + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/resources/3_0/11_regex.yaml b/modules/openapi-generator/src/test/resources/3_0/11_regex.yaml new file mode 100644 index 000000000000..1fd9eeadc93b --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/11_regex.yaml @@ -0,0 +1,27 @@ +openapi: 3.0.3 +info: + title: Test + version: 1.0.0-SNAPSHOT +paths: + /test: + get: + tags: + - Test Resource + parameters: + - name: uuid + in: query + schema: + $ref: '#/components/schemas/UUID' + responses: + "200": + description: OK +components: + schemas: + UUID: + format: uuid + pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" + type: string + StringWithRegexWithThreeFlags: + format: uuid + pattern: "/a./sim" + type: string \ No newline at end of file diff --git a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 3357b0ae1180..1259cf4310f8 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -2769,8 +2769,8 @@ components: Player: type: object description: a model that includes a self reference this forces properties and additionalProperties - to be lazy loaded in python models because the Player class has not fully loaded when defining - properties + to be lazy loaded in python models because the Player class has not fully loaded when defining + properties properties: name: type: string @@ -2941,4 +2941,21 @@ components: double: format: double float: - format: float \ No newline at end of file + format: float + FromSchema: + type: object + properties: + data: + type: string + id: + type: integer + ObjectWithInvalidNamedRefedProperties: + type: object + properties: + from: + $ref: "#/components/schemas/FromSchema" + "!reference": + $ref: "#/components/schemas/ArrayWithValidationsInItems" + required: + - from + - "!reference" \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/README.md b/samples/openapi3/client/3_0_3_unit_test/python/README.md index 87d4c1355383..3c71a079b1bd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/README.md +++ b/samples/openapi3/client/3_0_3_unit_test/python/README.md @@ -140,7 +140,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.apis import ref_api +from unit_test_api.apis.tags import ref_api from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties from unit_test_api.model.ref_in_allof import RefInAllof diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py index e1de9fcc9c60..9cae0457047e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py @@ -1048,7 +1048,7 @@ class ApiClient: ) -> urllib3.HTTPResponse: # header parameters - headers = headers or {} + headers = headers or HTTPHeaderDict() headers.update(self.default_headers) if self.cookie: headers['Cookie'] = self.cookie diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi index 25e7fbd78953..1370c0c573c2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_allows_a_schema_which_should_valid SchemaForRequestBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate +request_body_additionalproperties_allows_a_schema_which_should_validate = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi index b072f5769c20..b36b08ea7416 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_are_allowed_by_default import Addi SchemaForRequestBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault +request_body_additionalproperties_are_allowed_by_default = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_additionalproperties_are_allowed_by_default_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi index d575d1c6850c..06ee604bb41f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_can_exist_by_itself import Additio SchemaForRequestBodyApplicationJson = AdditionalpropertiesCanExistByItself +request_body_additionalproperties_can_exist_by_itself = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_additionalproperties_can_exist_by_itself_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi index 758b4e145807..c266c8997e91 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_should_not_look_in_applicators imp SchemaForRequestBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators +request_body_additionalproperties_should_not_look_in_applicators = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi index d499a70ec069..973d5fb182ab 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWit SchemaForRequestBodyApplicationJson = AllofCombinedWithAnyofOneof +request_body_allof_combined_with_anyof_oneof = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_allof_combined_with_anyof_oneof_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi index 60ba6149f6de..ee27dfce274c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.allof import Allof SchemaForRequestBodyApplicationJson = Allof +request_body_allof = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_allof_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi index e071ea77f174..4a4e7274482c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.allof_simple_types import AllofSimpleTypes SchemaForRequestBodyApplicationJson = AllofSimpleTypes +request_body_allof_simple_types = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_allof_simple_types_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi index e44333eddad8..0feecdc2723e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema SchemaForRequestBodyApplicationJson = AllofWithBaseSchema +request_body_allof_with_base_schema = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_allof_with_base_schema_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi index 06fd162a1f8e..386d9c559642 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySch SchemaForRequestBodyApplicationJson = AllofWithOneEmptySchema +request_body_allof_with_one_empty_schema = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_allof_with_one_empty_schema_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi index 1a72c9b8ae7f..6c068a889f63 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFi SchemaForRequestBodyApplicationJson = AllofWithTheFirstEmptySchema +request_body_allof_with_the_first_empty_schema = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_allof_with_the_first_empty_schema_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi index 176c4f8b2cbf..8ca26c1a3be5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLas SchemaForRequestBodyApplicationJson = AllofWithTheLastEmptySchema +request_body_allof_with_the_last_empty_schema = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_allof_with_the_last_empty_schema_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi index 19a2d2faa391..5521fdb15aef 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySc SchemaForRequestBodyApplicationJson = AllofWithTwoEmptySchemas +request_body_allof_with_two_empty_schemas = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_allof_with_two_empty_schemas_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi index 192aa4f69c26..50096bedca63 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.anyof_complex_types import AnyofComplexTypes SchemaForRequestBodyApplicationJson = AnyofComplexTypes +request_body_anyof_complex_types = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_anyof_complex_types_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi index 0f5688da5f08..6600c36c2c5f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.anyof import Anyof SchemaForRequestBodyApplicationJson = Anyof +request_body_anyof = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_anyof_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi index 550f76088a49..3eb77b77102b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema SchemaForRequestBodyApplicationJson = AnyofWithBaseSchema +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_anyof_with_base_schema_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi index bdffc46e920b..2e14ab6e08ba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySch SchemaForRequestBodyApplicationJson = AnyofWithOneEmptySchema +request_body_anyof_with_one_empty_schema = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_anyof_with_one_empty_schema_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi index eb6d81170cd7..77a876fdd116 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays SchemaForRequestBodyApplicationJson = ArrayTypeMatchesArrays +request_body_array_type_matches_arrays = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_array_type_matches_arrays_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi index d925f9924b0e..7311cae45c71 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi @@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401 SchemaForRequestBodyApplicationJson = schemas.BoolSchema +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_boolean_type_matches_booleans_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi index 8c041d1c729a..aa9da9d017a4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.by_int import ByInt SchemaForRequestBodyApplicationJson = ByInt +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_by_int_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi index 3993efa159e1..3347fd7cd7f8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.by_number import ByNumber SchemaForRequestBodyApplicationJson = ByNumber +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_by_number_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi index 36d5e3ab3003..f252fac791cc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.by_small_number import BySmallNumber SchemaForRequestBodyApplicationJson = BySmallNumber +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_by_small_number_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi index 3b4aa6f83e89..2ea6b7224943 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi @@ -52,6 +52,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_date_time_format_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi index 58a00c655732..add64eac3e82 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi @@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_email_format_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi index e55ac837734e..da41c9f6602a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNot SchemaForRequestBodyApplicationJson = EnumWith0DoesNotMatchFalse +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_enum_with0_does_not_match_false_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi index ab02d1d291ad..7e6b9c7d8892 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotM SchemaForRequestBodyApplicationJson = EnumWith1DoesNotMatchTrue +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_enum_with1_does_not_match_true_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi index 1176a75ee70a..66f6004527b3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedChar SchemaForRequestBodyApplicationJson = EnumWithEscapedCharacters +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_enum_with_escaped_characters_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi index 557cd7d28f91..66bac995f4e8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoe SchemaForRequestBodyApplicationJson = EnumWithFalseDoesNotMatch0 +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_enum_with_false_does_not_match0_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi index 9dca08f0d85b..86bd9472590c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesN SchemaForRequestBodyApplicationJson = EnumWithTrueDoesNotMatch1 +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_enum_with_true_does_not_match1_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi index 7068a12c3f77..0a75eb2c8747 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.enums_in_properties import EnumsInProperties SchemaForRequestBodyApplicationJson = EnumsInProperties +request_body_enums_in_properties = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_enums_in_properties_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi index d9a90d32798d..f22e0f525619 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.forbidden_property import ForbiddenProperty SchemaForRequestBodyApplicationJson = ForbiddenProperty +request_body_forbidden_property = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_forbidden_property_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi index ef40355adc40..abc778b44bbb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi @@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_hostname_format_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi index 7dd7bffef9e2..80bcedea0d6d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi @@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401 SchemaForRequestBodyApplicationJson = schemas.IntSchema +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_integer_type_matches_integers_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi index f6b9fe70ca29..445d68551117 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_divi SchemaForRequestBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi index 43cd727410af..716976926683 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.invalid_string_value_for_default import InvalidStringVa SchemaForRequestBodyApplicationJson = InvalidStringValueForDefault +request_body_invalid_string_value_for_default = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_invalid_string_value_for_default_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi index 3aba71094cd9..7f98cc50cb1f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi @@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_ipv4_format_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi index da20f09b8bf4..1821121e7fe4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi @@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_ipv6_format_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi index cf655dc8344e..ef95d6545078 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi @@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_json_pointer_format_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi index a0fe21e85a9b..7282d631f833 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.maximum_validation import MaximumValidation SchemaForRequestBodyApplicationJson = MaximumValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_maximum_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi index bfa19c4e273b..419cb115fdd4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.maximum_validation_with_unsigned_integer import Maximum SchemaForRequestBodyApplicationJson = MaximumValidationWithUnsignedInteger +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_maximum_validation_with_unsigned_integer_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi index 7ebf68559e87..ab7f2144ffbe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.maxitems_validation import MaxitemsValidation SchemaForRequestBodyApplicationJson = MaxitemsValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_maxitems_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi index 389fa871253c..1918c7c22e2e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.maxlength_validation import MaxlengthValidation SchemaForRequestBodyApplicationJson = MaxlengthValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_maxlength_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi index 8b95b9db9ae9..cba498b98549 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxprop SchemaForRequestBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi index d2d653f7f85b..ab37e826c1d5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation SchemaForRequestBodyApplicationJson = MaxpropertiesValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_maxproperties_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi index e9a2ca6e690e..90fa06c9d1b3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.minimum_validation import MinimumValidation SchemaForRequestBodyApplicationJson = MinimumValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_minimum_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi index 122e426ea136..2147aea2aa24 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.minimum_validation_with_signed_integer import MinimumVa SchemaForRequestBodyApplicationJson = MinimumValidationWithSignedInteger +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_minimum_validation_with_signed_integer_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi index 5ac55630f3ef..bcf1abf415cd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.minitems_validation import MinitemsValidation SchemaForRequestBodyApplicationJson = MinitemsValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_minitems_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi index efbd2d452375..a7c977dbf829 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.minlength_validation import MinlengthValidation SchemaForRequestBodyApplicationJson = MinlengthValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_minlength_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi index a92e09bb8582..07c74d49b44e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.minproperties_validation import MinpropertiesValidation SchemaForRequestBodyApplicationJson = MinpropertiesValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_minproperties_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi index 7958e9d7d5d3..4c749d8368de 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.nested_allof_to_check_validation_semantics import Neste SchemaForRequestBodyApplicationJson = NestedAllofToCheckValidationSemantics +request_body_nested_allof_to_check_validation_semantics = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_nested_allof_to_check_validation_semantics_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi index 6e9b84a1841d..c10f472591a3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.nested_anyof_to_check_validation_semantics import Neste SchemaForRequestBodyApplicationJson = NestedAnyofToCheckValidationSemantics +request_body_nested_anyof_to_check_validation_semantics = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi index 6e7649ccf3b7..9a6f7d560515 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.nested_items import NestedItems SchemaForRequestBodyApplicationJson = NestedItems +request_body_nested_items = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_nested_items_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi index 61ea779a722e..498a3c736599 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.nested_oneof_to_check_validation_semantics import Neste SchemaForRequestBodyApplicationJson = NestedOneofToCheckValidationSemantics +request_body_nested_oneof_to_check_validation_semantics = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi index 584ba00cf8ea..17498e67f7e3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi @@ -100,6 +100,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_not_more_complex_schema_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi index b791ed43f465..bbc798b3e350 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi @@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_not_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi index 87a26d9477e2..766d94fffa36 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings SchemaForRequestBodyApplicationJson = NulCharactersInStrings +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_nul_characters_in_strings_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi index 750f0f65ada9..4a3ee5ca3043 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi @@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401 SchemaForRequestBodyApplicationJson = schemas.NoneSchema +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_null_type_matches_only_the_null_object_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi index 38e54c85a2a1..ff700182724c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi @@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401 SchemaForRequestBodyApplicationJson = schemas.NumberSchema +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_number_type_matches_numbers_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi index 8890fcc4f9cb..4a54bcd80fa3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.object_properties_validation import ObjectPropertiesVal SchemaForRequestBodyApplicationJson = ObjectPropertiesValidation +request_body_object_properties_validation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_object_properties_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi index 0220145ecb83..0b63e04eb3aa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi @@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401 SchemaForRequestBodyApplicationJson = schemas.DictSchema +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_object_type_matches_objects_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi index d26388239488..422d44942985 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.oneof_complex_types import OneofComplexTypes SchemaForRequestBodyApplicationJson = OneofComplexTypes +request_body_oneof_complex_types = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_oneof_complex_types_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi index 5d3b6b34a0ea..fbc36a3e4a52 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.oneof import Oneof SchemaForRequestBodyApplicationJson = Oneof +request_body_oneof = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_oneof_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi index eeb2e4277bea..9d6eaddc1369 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema SchemaForRequestBodyApplicationJson = OneofWithBaseSchema +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_oneof_with_base_schema_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi index 93b507c78abf..d9436596abda 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema SchemaForRequestBodyApplicationJson = OneofWithEmptySchema +request_body_oneof_with_empty_schema = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_oneof_with_empty_schema_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi index 330e13c653b6..b5f3241f4d70 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.oneof_with_required import OneofWithRequired SchemaForRequestBodyApplicationJson = OneofWithRequired +request_body_oneof_with_required = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_oneof_with_required_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi index 72d9dc32bb5c..e48845767309 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored SchemaForRequestBodyApplicationJson = PatternIsNotAnchored +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_pattern_is_not_anchored_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi index 014a5a449dfe..952dcdc9fab5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.pattern_validation import PatternValidation SchemaForRequestBodyApplicationJson = PatternValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_pattern_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi index 936055dcd88c..1b22713ef275 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.properties_with_escaped_characters import PropertiesWit SchemaForRequestBodyApplicationJson = PropertiesWithEscapedCharacters +request_body_properties_with_escaped_characters = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_properties_with_escaped_characters_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi index 85dcbf631830..241b2ae7d165 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.property_named_ref_that_is_not_a_reference import Prope SchemaForRequestBodyApplicationJson = PropertyNamedRefThatIsNotAReference +request_body_property_named_ref_that_is_not_a_reference = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi index 8579929fbcb3..3d2514fbed64 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalprope SchemaForRequestBodyApplicationJson = RefInAdditionalproperties +request_body_ref_in_additionalproperties = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_ref_in_additionalproperties_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi index c2cf146102f8..0c9d567d33a9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_allof import RefInAllof SchemaForRequestBodyApplicationJson = RefInAllof +request_body_ref_in_allof = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_ref_in_allof_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi index 15fe13e71ce7..f4f9a7b1a493 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_anyof import RefInAnyof SchemaForRequestBodyApplicationJson = RefInAnyof +request_body_ref_in_anyof = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_ref_in_anyof_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi index 92fe301b68ba..34f7287cf045 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_items import RefInItems SchemaForRequestBodyApplicationJson = RefInItems +request_body_ref_in_items = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_ref_in_items_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi index b764ab5d1aa2..303f27c5bc35 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi @@ -56,6 +56,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_ref_in_not_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi index 2c7e0962e03f..34109a993be0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_oneof import RefInOneof SchemaForRequestBodyApplicationJson = RefInOneof +request_body_ref_in_oneof = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_ref_in_oneof_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi index 1c8577a746cb..cc614f379b54 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_property import RefInProperty SchemaForRequestBodyApplicationJson = RefInProperty +request_body_ref_in_property = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_ref_in_property_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi index 2f164dcd785b..43e3423d7a75 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.required_default_validation import RequiredDefaultValid SchemaForRequestBodyApplicationJson = RequiredDefaultValidation +request_body_required_default_validation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_required_default_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi index c8d141433cd2..a209a78e36d8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.required_validation import RequiredValidation SchemaForRequestBodyApplicationJson = RequiredValidation +request_body_required_validation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_required_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi index 05070e8b80eb..648231aa56d9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray SchemaForRequestBodyApplicationJson = RequiredWithEmptyArray +request_body_required_with_empty_array = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_required_with_empty_array_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi index ddc024fd9d00..946dc986638f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi @@ -59,6 +59,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_required_with_escaped_characters_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi index 7bb345e5f683..8fdb04951657 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.simple_enum_validation import SimpleEnumValidation SchemaForRequestBodyApplicationJson = SimpleEnumValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_simple_enum_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi index 50d8f7f9f3bc..66e8f33e0f38 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi @@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401 SchemaForRequestBodyApplicationJson = schemas.StrSchema +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_string_type_matches_strings_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi index b0d69d7aa921..e652a6ce5a7e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_propert SchemaForRequestBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing +request_body_the_default_keyword_does_not_do_anything_if_the_property_is_missing = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi index 03457ae0a3a2..d4f41d180eb4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseVal SchemaForRequestBodyApplicationJson = UniqueitemsFalseValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_uniqueitems_false_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi index dfe7f9041cf1..b6a1a425d3f3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi @@ -31,6 +31,27 @@ from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation SchemaForRequestBodyApplicationJson = UniqueitemsValidation +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_uniqueitems_validation_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi index 7f3fa41ba21d..b3f45cc05829 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi @@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_uri_format_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi index a7fe122f3a14..a859644f9916 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi @@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_uri_reference_format_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi index e6ff0166fa6b..41c8e8ca96f4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi @@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _post_uri_template_format_request_body_oapg( diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi index db7eb1654390..ecf94ba86aa1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi index 689d638523cc..a29cd550c703 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi index 73cab792eb7e..feaf38ff3348 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesCanExistByItself + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi index f5bddfa94886..65faa596e5c8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi index 28401bd1cd33..efc5a0d8a614 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof SchemaFor200ResponseBodyApplicationJson = AllofCombinedWithAnyofOneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi index d04ed5d067a4..2c35f82065dd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.allof import Allof SchemaFor200ResponseBodyApplicationJson = Allof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi index 7030b29ba8f0..83331bab139f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.allof_simple_types import AllofSimpleTypes SchemaFor200ResponseBodyApplicationJson = AllofSimpleTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi index dfbabc6c18fe..61e241797c65 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema SchemaFor200ResponseBodyApplicationJson = AllofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi index d189cb26e516..1f663d3710cb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema SchemaFor200ResponseBodyApplicationJson = AllofWithOneEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi index b467287f0a77..1080e7777e30 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema SchemaFor200ResponseBodyApplicationJson = AllofWithTheFirstEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi index f502a2a7ec2d..b1ff4b155d70 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema SchemaFor200ResponseBodyApplicationJson = AllofWithTheLastEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi index 43650cf13725..ac062d91a1f2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas SchemaFor200ResponseBodyApplicationJson = AllofWithTwoEmptySchemas + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi index 507becb0fc70..b0a9f0d4ed56 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.anyof_complex_types import AnyofComplexTypes SchemaFor200ResponseBodyApplicationJson = AnyofComplexTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi index 9b227c718c22..82fc25630a2f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.anyof import Anyof SchemaFor200ResponseBodyApplicationJson = Anyof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi index f1c8912f7b2a..6ef98d0ec865 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema SchemaFor200ResponseBodyApplicationJson = AnyofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi index e59f582c8629..1d5830c028a3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema SchemaFor200ResponseBodyApplicationJson = AnyofWithOneEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi index d5676f035813..cf116ce47a9c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays SchemaFor200ResponseBodyApplicationJson = ArrayTypeMatchesArrays + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi index 8b5b589c4641..58b6aa58d7e0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi @@ -26,6 +26,24 @@ import frozendict # noqa: F401 from unit_test_api import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.BoolSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi index 61b3d81b320b..3d9f71836d2f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.by_int import ByInt SchemaFor200ResponseBodyApplicationJson = ByInt + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi index 3d9ebcd6a050..ecca7dee4c2e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.by_number import ByNumber SchemaFor200ResponseBodyApplicationJson = ByNumber + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi index 62adbca6a882..68dcdbf80fbb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.by_small_number import BySmallNumber SchemaFor200ResponseBodyApplicationJson = BySmallNumber + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi index 18588164a4ed..937646efc79e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi @@ -49,6 +49,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi index 4429c79bc492..3154ac4e53dd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi @@ -48,6 +48,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi index 4fb57b1ddef0..aa571b52cafa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse SchemaFor200ResponseBodyApplicationJson = EnumWith0DoesNotMatchFalse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi index 9f60984e6805..ceae4718462c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue SchemaFor200ResponseBodyApplicationJson = EnumWith1DoesNotMatchTrue + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi index cdc047c43ee3..6b2e4ef65e3a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters SchemaFor200ResponseBodyApplicationJson = EnumWithEscapedCharacters + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi index ce05cb3a3bf5..0207c9513e36 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 SchemaFor200ResponseBodyApplicationJson = EnumWithFalseDoesNotMatch0 + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi index 83e53e24ef95..d79cadd9d5f4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 SchemaFor200ResponseBodyApplicationJson = EnumWithTrueDoesNotMatch1 + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi index 3e30e6e60382..96c19414e06d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.enums_in_properties import EnumsInProperties SchemaFor200ResponseBodyApplicationJson = EnumsInProperties + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi index 7d3e87545584..19a5f019e4ab 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.forbidden_property import ForbiddenProperty SchemaFor200ResponseBodyApplicationJson = ForbiddenProperty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi index d1d8399b74ac..047b3dc55d1e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi @@ -48,6 +48,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi index de78604fa037..55f4fa439fdb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi @@ -26,6 +26,24 @@ import frozendict # noqa: F401 from unit_test_api import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.IntSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi index 28222ab88843..72090830d306 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf SchemaFor200ResponseBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi index 98e0646ddd11..8814f1d54987 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault SchemaFor200ResponseBodyApplicationJson = InvalidStringValueForDefault + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi index 25cfffb07b7b..c0a1f9e878bb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi @@ -48,6 +48,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi index 5d0ca450c001..fd04aba9e56f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi @@ -48,6 +48,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi index ee0046c4b619..911e34bdf2df 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi @@ -48,6 +48,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi index af9bf3e4498e..42e2a091c7af 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.maximum_validation import MaximumValidation SchemaFor200ResponseBodyApplicationJson = MaximumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi index f9b7b2d422cd..ba637150a1c8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger SchemaFor200ResponseBodyApplicationJson = MaximumValidationWithUnsignedInteger + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi index 8a6f7dd62a48..762dff4b02f3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.maxitems_validation import MaxitemsValidation SchemaFor200ResponseBodyApplicationJson = MaxitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi index 012642e4f120..6879b598b5d4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.maxlength_validation import MaxlengthValidation SchemaFor200ResponseBodyApplicationJson = MaxlengthValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi index 62373744f4d5..7cb80295f08d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty SchemaFor200ResponseBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi index 3e70643f892f..4867e4d38fac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation SchemaFor200ResponseBodyApplicationJson = MaxpropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi index 79c039afac8f..92a38918b29e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.minimum_validation import MinimumValidation SchemaFor200ResponseBodyApplicationJson = MinimumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi index 6b0093829227..77297ce3d6d2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger SchemaFor200ResponseBodyApplicationJson = MinimumValidationWithSignedInteger + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi index 963b82507615..329d06f54333 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.minitems_validation import MinitemsValidation SchemaFor200ResponseBodyApplicationJson = MinitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi index e2be043aa1f9..1d3bc58d84ae 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.minlength_validation import MinlengthValidation SchemaFor200ResponseBodyApplicationJson = MinlengthValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi index 9f96ff8fc182..a4cc590d02db 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.minproperties_validation import MinpropertiesValidation SchemaFor200ResponseBodyApplicationJson = MinpropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi index c943fe0c3431..0d6f8d84f532 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics SchemaFor200ResponseBodyApplicationJson = NestedAllofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi index 57f3c654b5e0..236e09bd4b2c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics SchemaFor200ResponseBodyApplicationJson = NestedAnyofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi index cd89ba08e85a..8fb02abc720a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.nested_items import NestedItems SchemaFor200ResponseBodyApplicationJson = NestedItems + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi index cc87b6112f38..88c149b9efda 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics SchemaFor200ResponseBodyApplicationJson = NestedOneofToCheckValidationSemantics + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi index fff2e73fd7ba..6a046c21bcb0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi @@ -97,6 +97,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi index 5f30622b8e89..50eac852dda6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi @@ -48,6 +48,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi index c16dc293e2b8..71eaa5319d33 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings SchemaFor200ResponseBodyApplicationJson = NulCharactersInStrings + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi index 89cde51ed053..171e41262d38 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi @@ -26,6 +26,24 @@ import frozendict # noqa: F401 from unit_test_api import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.NoneSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi index e945e45b29f3..2fddb1916b77 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi @@ -26,6 +26,24 @@ import frozendict # noqa: F401 from unit_test_api import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.NumberSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi index c58758a9b33e..77a66a20a21c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation SchemaFor200ResponseBodyApplicationJson = ObjectPropertiesValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi index 6a15b0be4a3c..17761ab2aea6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi @@ -26,6 +26,24 @@ import frozendict # noqa: F401 from unit_test_api import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi index 1de9c2812e4b..ef4e3db4b755 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.oneof_complex_types import OneofComplexTypes SchemaFor200ResponseBodyApplicationJson = OneofComplexTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi index 3c51bc63fac9..0e80941b94c0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.oneof import Oneof SchemaFor200ResponseBodyApplicationJson = Oneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi index 20a5b3d90e61..a4520fbcbcc0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema SchemaFor200ResponseBodyApplicationJson = OneofWithBaseSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi index 48c41793c519..8be646f64b3d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema SchemaFor200ResponseBodyApplicationJson = OneofWithEmptySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi index ca3ec89b5019..b37d5504caf3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.oneof_with_required import OneofWithRequired SchemaFor200ResponseBodyApplicationJson = OneofWithRequired + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi index 97b297ceac9b..aad1c7292f3d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored SchemaFor200ResponseBodyApplicationJson = PatternIsNotAnchored + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi index 7b04aed83950..30a1e571a985 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.pattern_validation import PatternValidation SchemaFor200ResponseBodyApplicationJson = PatternValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi index ea8e9df1a043..3abc1bc84604 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters SchemaFor200ResponseBodyApplicationJson = PropertiesWithEscapedCharacters + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi index 661d27604efe..4fe3e9e7e21f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference SchemaFor200ResponseBodyApplicationJson = PropertyNamedRefThatIsNotAReference + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi index 2d2b7b1896bf..86122e765dc2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties SchemaFor200ResponseBodyApplicationJson = RefInAdditionalproperties + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi index 5056c8c3d8b0..05601b185083 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.ref_in_allof import RefInAllof SchemaFor200ResponseBodyApplicationJson = RefInAllof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi index 7979d632da56..a08c876cc617 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.ref_in_anyof import RefInAnyof SchemaFor200ResponseBodyApplicationJson = RefInAnyof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi index 556bcc20599f..471e8d359e32 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.ref_in_items import RefInItems SchemaFor200ResponseBodyApplicationJson = RefInItems + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi index 41a03ddcec40..e3751f78f03c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi @@ -53,6 +53,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi index f86ae484464c..fac7d3b0d832 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.ref_in_oneof import RefInOneof SchemaFor200ResponseBodyApplicationJson = RefInOneof + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi index 220be3be5344..d6347ad6aea5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.ref_in_property import RefInProperty SchemaFor200ResponseBodyApplicationJson = RefInProperty + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi index 33f982987473..4b997ec3fdc6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.required_default_validation import RequiredDefaultValidation SchemaFor200ResponseBodyApplicationJson = RequiredDefaultValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi index e0c69bcc7040..28fb2e0eb9d5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.required_validation import RequiredValidation SchemaFor200ResponseBodyApplicationJson = RequiredValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi index 2eed312b7b92..8f1704180f07 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray SchemaFor200ResponseBodyApplicationJson = RequiredWithEmptyArray + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi index f9918ddfeafd..96c162a0db31 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi @@ -56,6 +56,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi index cba5ecd20807..f447b0b2edce 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.simple_enum_validation import SimpleEnumValidation SchemaFor200ResponseBodyApplicationJson = SimpleEnumValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi index 29eee86cd669..a8273f1b16da 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi @@ -26,6 +26,24 @@ import frozendict # noqa: F401 from unit_test_api import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.StrSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi index e982ab5f7ded..e9cd136c49ca 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing SchemaFor200ResponseBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi index 6b02a8900715..66609e60b068 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation SchemaFor200ResponseBodyApplicationJson = UniqueitemsFalseValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi index 642059237c32..c09e072b67b1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi @@ -28,6 +28,24 @@ from unit_test_api import schemas # noqa: F401 from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation SchemaFor200ResponseBodyApplicationJson = UniqueitemsValidation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi index 718073cf8671..657918c5de10 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi @@ -48,6 +48,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi index 09e8886136de..4bba84c0b1e5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi @@ -48,6 +48,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi index 7e04b30ce5d5..1cf7bd74ca8c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi @@ -48,6 +48,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py index 3ffd38e7cf94..c9fe4b6fecf5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py @@ -1883,6 +1883,7 @@ class ComposedBase(Discriminable): "Invalid inputs given to generate an instance of {}. Multiple " "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) ) + # exactly one class matches return path_to_schemas @classmethod @@ -1947,7 +1948,9 @@ class ComposedBase(Discriminable): ) # process composed schema - discriminator = getattr(cls, 'discriminator', None) + discriminator = None + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): + discriminator = cls.MetaOapg.discriminator() discriminated_cls = None if discriminator and arg and isinstance(arg, frozendict.frozendict): disc_property_name = list(discriminator.keys())[0] diff --git a/samples/openapi3/client/features/dynamic-servers/python/README.md b/samples/openapi3/client/features/dynamic-servers/python/README.md index 414bf0bd1f04..c7567b057f7a 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/README.md +++ b/samples/openapi3/client/features/dynamic-servers/python/README.md @@ -140,7 +140,7 @@ Please follow the [installation procedure](#installation--usage) and then run th import time import dynamic_servers from pprint import pprint -from dynamic_servers.apis import usage_api +from dynamic_servers.apis.tags import usage_api # Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 # See configuration.py for a list of all supported configuration parameters. configuration = dynamic_servers.Configuration( diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py index 3bf3c5f6652f..cb395d6b6b5d 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py @@ -1048,7 +1048,7 @@ class ApiClient: ) -> urllib3.HTTPResponse: # header parameters - headers = headers or {} + headers = headers or HTTPHeaderDict() headers.update(self.default_headers) if self.cookie: headers['Cookie'] = self.cookie diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi index 4522fe6e95cd..698792fd15f9 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi @@ -26,6 +26,24 @@ import frozendict # noqa: F401 from dynamic_servers import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi index 80aebb29e2d4..28e35b4b46e3 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi @@ -26,6 +26,24 @@ import frozendict # noqa: F401 from dynamic_servers import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py index 488aee6068f8..3678a8294546 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py @@ -1883,6 +1883,7 @@ class ComposedBase(Discriminable): "Invalid inputs given to generate an instance of {}. Multiple " "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) ) + # exactly one class matches return path_to_schemas @classmethod @@ -1947,7 +1948,9 @@ class ComposedBase(Discriminable): ) # process composed schema - discriminator = getattr(cls, 'discriminator', None) + discriminator = None + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): + discriminator = cls.MetaOapg.discriminator() discriminated_cls = None if discriminator and arg and isinstance(arg, frozendict.frozendict): disc_property_name = list(discriminator.keys())[0] diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/FILES b/samples/openapi3/client/petstore/python/.openapi-generator/FILES index 0ce65f0078f7..f805094f7eb4 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python/.openapi-generator/FILES @@ -63,6 +63,7 @@ docs/models/File.md docs/models/FileSchemaTestClass.md docs/models/Foo.md docs/models/FormatTest.md +docs/models/FromSchema.md docs/models/Fruit.md docs/models/FruitReq.md docs/models/GmFruit.md @@ -99,6 +100,7 @@ docs/models/ObjectModelWithRefProps.md docs/models/ObjectWithDecimalProperties.md docs/models/ObjectWithDifficultlyNamedProps.md docs/models/ObjectWithInlineCompositionProperty.md +docs/models/ObjectWithInvalidNamedRefedProperties.md docs/models/ObjectWithValidations.md docs/models/Order.md docs/models/ParentPet.md @@ -248,6 +250,8 @@ petstore_api/model/foo.py petstore_api/model/foo.pyi petstore_api/model/format_test.py petstore_api/model/format_test.pyi +petstore_api/model/from_schema.py +petstore_api/model/from_schema.pyi petstore_api/model/fruit.py petstore_api/model/fruit.pyi petstore_api/model/fruit_req.py @@ -320,6 +324,8 @@ petstore_api/model/object_with_difficultly_named_props.py petstore_api/model/object_with_difficultly_named_props.pyi petstore_api/model/object_with_inline_composition_property.py petstore_api/model/object_with_inline_composition_property.pyi +petstore_api/model/object_with_invalid_named_refed_properties.py +petstore_api/model/object_with_invalid_named_refed_properties.pyi petstore_api/model/object_with_validations.py petstore_api/model/object_with_validations.pyi petstore_api/model/order.py diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index e85cd0648301..e0101d4f2c0d 100644 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -140,7 +140,7 @@ import datetimeimport datetimeimport datetimeimport datetimeimport datetimeimpor import time import petstore_api from pprint import pprint -from petstore_api.apis import another_fake_api +from petstore_api.apis.tags import another_fake_api from petstore_api.model.client import Client # Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 # See configuration.py for a list of all supported configuration parameters. @@ -284,6 +284,7 @@ Class | Method | HTTP request | Description - [FileSchemaTestClass](docs/models/FileSchemaTestClass.md) - [Foo](docs/models/Foo.md) - [FormatTest](docs/models/FormatTest.md) + - [FromSchema](docs/models/FromSchema.md) - [Fruit](docs/models/Fruit.md) - [FruitReq](docs/models/FruitReq.md) - [GmFruit](docs/models/GmFruit.md) @@ -320,6 +321,7 @@ Class | Method | HTTP request | Description - [ObjectWithDecimalProperties](docs/models/ObjectWithDecimalProperties.md) - [ObjectWithDifficultlyNamedProps](docs/models/ObjectWithDifficultlyNamedProps.md) - [ObjectWithInlineCompositionProperty](docs/models/ObjectWithInlineCompositionProperty.md) + - [ObjectWithInvalidNamedRefedProperties](docs/models/ObjectWithInvalidNamedRefedProperties.md) - [ObjectWithValidations](docs/models/ObjectWithValidations.md) - [Order](docs/models/Order.md) - [ParentPet](docs/models/ParentPet.md) diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md index a368406d7b28..ad2384b1241d 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -949,8 +949,8 @@ with petstore_api.ApiClient(configuration) as api_client: number=32.1, _float=3.14, double=67.8, - string="A", - pattern_without_delimiter="Aj", + string="a", + pattern_without_delimiter="AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>", byte='YQ==', binary=open('/path/to/file', 'rb'), date="1970-01-01", diff --git a/samples/openapi3/client/petstore/python/docs/models/FromSchema.md b/samples/openapi3/client/petstore/python/docs/models/FromSchema.md new file mode 100644 index 000000000000..c11c63adb63a --- /dev/null +++ b/samples/openapi3/client/petstore/python/docs/models/FromSchema.md @@ -0,0 +1,16 @@ +# petstore_api.model.from_schema.FromSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**data** | str, | str, | | [optional] +**id** | decimal.Decimal, int, | decimal.Decimal, | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectWithInvalidNamedRefedProperties.md b/samples/openapi3/client/petstore/python/docs/models/ObjectWithInvalidNamedRefedProperties.md new file mode 100644 index 000000000000..d3762cc45cc1 --- /dev/null +++ b/samples/openapi3/client/petstore/python/docs/models/ObjectWithInvalidNamedRefedProperties.md @@ -0,0 +1,16 @@ +# petstore_api.model.object_with_invalid_named_refed_properties.ObjectWithInvalidNamedRefedProperties + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**!reference** | [**ArrayWithValidationsInItems**](ArrayWithValidationsInItems.md) | [**ArrayWithValidationsInItems**](ArrayWithValidationsInItems.md) | | +**from** | [**FromSchema**](FromSchema.md) | [**FromSchema**](FromSchema.md) | | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index b5d32822d19e..6238c9fbfde8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -1048,7 +1048,7 @@ class ApiClient: ) -> urllib3.HTTPResponse: # header parameters - headers = headers or {} + headers = headers or HTTPHeaderDict() headers.update(self.default_headers) if self.cookie: headers['Cookie'] = self.cookie diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py b/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py new file mode 100644 index 000000000000..556b85187cd2 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +class FromSchema( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + data = schemas.StrSchema + id = schemas.IntSchema + __annotations__ = { + "data": data, + "id": id, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["data", "id", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> typing.Union[MetaOapg.properties.data, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["data", "id", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict.frozendict, ], + data: typing.Union[MetaOapg.properties.data, str, schemas.Unset] = schemas.unset, + id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'FromSchema': + return super().__new__( + cls, + *args, + data=data, + id=id, + _configuration=_configuration, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi new file mode 100644 index 000000000000..556b85187cd2 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +class FromSchema( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + data = schemas.StrSchema + id = schemas.IntSchema + __annotations__ = { + "data": data, + "id": id, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["data", "id", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> typing.Union[MetaOapg.properties.data, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["data", "id", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict.frozendict, ], + data: typing.Union[MetaOapg.properties.data, str, schemas.Unset] = schemas.unset, + id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'FromSchema': + return super().__new__( + cls, + *args, + data=data, + id=id, + _configuration=_configuration, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py new file mode 100644 index 000000000000..0efcbfa5f4c5 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +class ObjectWithInvalidNamedRefedProperties( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + required = { + "!reference", + "from", + } + + class properties: + + @staticmethod + def _from() -> typing.Type['FromSchema']: + return FromSchema + + @staticmethod + def reference() -> typing.Type['ArrayWithValidationsInItems']: + return ArrayWithValidationsInItems + __annotations__ = { + "from": _from, + "!reference": reference, + } + + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["from"]) -> 'FromSchema': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["!reference"]) -> 'ArrayWithValidationsInItems': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["from", "!reference", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["from"]) -> 'FromSchema': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["!reference"]) -> 'ArrayWithValidationsInItems': ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["from", "!reference", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ObjectWithInvalidNamedRefedProperties': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + +from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems +from petstore_api.model.from_schema import FromSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi new file mode 100644 index 000000000000..0efcbfa5f4c5 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +class ObjectWithInvalidNamedRefedProperties( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + required = { + "!reference", + "from", + } + + class properties: + + @staticmethod + def _from() -> typing.Type['FromSchema']: + return FromSchema + + @staticmethod + def reference() -> typing.Type['ArrayWithValidationsInItems']: + return ArrayWithValidationsInItems + __annotations__ = { + "from": _from, + "!reference": reference, + } + + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["from"]) -> 'FromSchema': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["!reference"]) -> 'ArrayWithValidationsInItems': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["from", "!reference", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["from"]) -> 'FromSchema': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["!reference"]) -> 'ArrayWithValidationsInItems': ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["from", "!reference", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ObjectWithInvalidNamedRefedProperties': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) + +from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems +from petstore_api.model.from_schema import FromSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py index 0518982ad969..a3f42957f901 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py @@ -65,6 +65,7 @@ from petstore_api.model.file import File from petstore_api.model.file_schema_test_class import FileSchemaTestClass from petstore_api.model.foo import Foo from petstore_api.model.format_test import FormatTest +from petstore_api.model.from_schema import FromSchema from petstore_api.model.fruit import Fruit from petstore_api.model.fruit_req import FruitReq from petstore_api.model.gm_fruit import GmFruit @@ -101,6 +102,7 @@ from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefPro from petstore_api.model.object_with_decimal_properties import ObjectWithDecimalProperties from petstore_api.model.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps from petstore_api.model.object_with_inline_composition_property import ObjectWithInlineCompositionProperty +from petstore_api.model.object_with_invalid_named_refed_properties import ObjectWithInvalidNamedRefedProperties from petstore_api.model.object_with_validations import ObjectWithValidations from petstore_api.model.order import Order from petstore_api.model.parent_pet import ParentPet diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi index dc0216a43f1c..48f912203160 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi @@ -29,7 +29,34 @@ from petstore_api.model.client import Client # body param SchemaForRequestBodyApplicationJson = Client + + +request_body_client = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) SchemaFor200ResponseBodyApplicationJson = Client + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi index 7c79e3509dfa..689aa4285468 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi @@ -30,9 +30,98 @@ RequiredStringGroupSchema = schemas.IntSchema RequiredInt64GroupSchema = schemas.Int64Schema StringGroupSchema = schemas.IntSchema Int64GroupSchema = schemas.Int64Schema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'required_string_group': typing.Union[RequiredStringGroupSchema, decimal.Decimal, int, ], + 'required_int64_group': typing.Union[RequiredInt64GroupSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'string_group': typing.Union[StringGroupSchema, decimal.Decimal, int, ], + 'int64_group': typing.Union[Int64GroupSchema, decimal.Decimal, int, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_required_string_group = api_client.QueryParameter( + name="required_string_group", + style=api_client.ParameterStyle.FORM, + schema=RequiredStringGroupSchema, + required=True, + explode=True, +) +request_query_required_int64_group = api_client.QueryParameter( + name="required_int64_group", + style=api_client.ParameterStyle.FORM, + schema=RequiredInt64GroupSchema, + required=True, + explode=True, +) +request_query_string_group = api_client.QueryParameter( + name="string_group", + style=api_client.ParameterStyle.FORM, + schema=StringGroupSchema, + explode=True, +) +request_query_int64_group = api_client.QueryParameter( + name="int64_group", + style=api_client.ParameterStyle.FORM, + schema=Int64GroupSchema, + explode=True, +) # header params RequiredBooleanGroupSchema = schemas.BoolSchema BooleanGroupSchema = schemas.BoolSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + 'required_boolean_group': typing.Union[RequiredBooleanGroupSchema, bool, ], + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'boolean_group': typing.Union[BooleanGroupSchema, bool, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_required_boolean_group = api_client.HeaderParameter( + name="required_boolean_group", + style=api_client.ParameterStyle.SIMPLE, + schema=RequiredBooleanGroupSchema, + required=True, +) +request_header_boolean_group = api_client.HeaderParameter( + name="boolean_group", + style=api_client.ParameterStyle.SIMPLE, + schema=BooleanGroupSchema, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi index 7db648567989..9359afe3333e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi @@ -108,6 +108,51 @@ class EnumQueryDoubleSchema( @schemas.classproperty def NEGATIVE_1_PT_2(cls): return cls(-1.2) +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'enum_query_string_array': typing.Union[EnumQueryStringArraySchema, list, tuple, ], + 'enum_query_string': typing.Union[EnumQueryStringSchema, str, ], + 'enum_query_integer': typing.Union[EnumQueryIntegerSchema, decimal.Decimal, int, ], + 'enum_query_double': typing.Union[EnumQueryDoubleSchema, decimal.Decimal, int, float, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_enum_query_string_array = api_client.QueryParameter( + name="enum_query_string_array", + style=api_client.ParameterStyle.FORM, + schema=EnumQueryStringArraySchema, + explode=True, +) +request_query_enum_query_string = api_client.QueryParameter( + name="enum_query_string", + style=api_client.ParameterStyle.FORM, + schema=EnumQueryStringSchema, + explode=True, +) +request_query_enum_query_integer = api_client.QueryParameter( + name="enum_query_integer", + style=api_client.ParameterStyle.FORM, + schema=EnumQueryIntegerSchema, + explode=True, +) +request_query_enum_query_double = api_client.QueryParameter( + name="enum_query_double", + style=api_client.ParameterStyle.FORM, + schema=EnumQueryDoubleSchema, + explode=True, +) # header params @@ -163,6 +208,35 @@ class EnumHeaderStringSchema( @schemas.classproperty def XYZ(cls): return cls("(xyz)") +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'enum_header_string_array': typing.Union[EnumHeaderStringArraySchema, list, tuple, ], + 'enum_header_string': typing.Union[EnumHeaderStringSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_enum_header_string_array = api_client.HeaderParameter( + name="enum_header_string_array", + style=api_client.ParameterStyle.SIMPLE, + schema=EnumHeaderStringArraySchema, +) +request_header_enum_header_string = api_client.HeaderParameter( + name="enum_header_string", + style=api_client.ParameterStyle.SIMPLE, + schema=EnumHeaderStringSchema, +) # body param @@ -278,6 +352,38 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) +request_body_body = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) + + class BaseApi(api_client.Api): def _enum_parameters_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi index 9513e0bc08d1..b89b07bb4678 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi @@ -29,7 +29,34 @@ from petstore_api.model.client import Client # body param SchemaForRequestBodyApplicationJson = Client + + +request_body_client = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) SchemaFor200ResponseBodyApplicationJson = Client + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi index e6ee494da3e6..1f4966ce3df7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi @@ -257,6 +257,38 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) +request_body_body = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) + + class BaseApi(api_client.Api): def _endpoint_parameters_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi index 297cb4db509d..670f6a41195c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi @@ -29,7 +29,33 @@ from petstore_api.model.additional_properties_with_array_of_enums import Additio # body param SchemaForRequestBodyApplicationJson = AdditionalPropertiesWithArrayOfEnums + + +request_body_additional_properties_with_array_of_enums = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) SchemaFor200ResponseBodyApplicationJson = AdditionalPropertiesWithArrayOfEnums + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi index d5f6d24f0a77..74c2ccf30217 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi @@ -31,6 +31,27 @@ from petstore_api.model.file_schema_test_class import FileSchemaTestClass SchemaForRequestBodyApplicationJson = FileSchemaTestClass +request_body_file_schema_test_class = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _body_with_file_schema_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi index 43c581649434..e524a4dc6889 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi @@ -29,10 +29,56 @@ from petstore_api.model.user import User # query params QuerySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'query': typing.Union[QuerySchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_query = api_client.QueryParameter( + name="query", + style=api_client.ParameterStyle.FORM, + schema=QuerySchema, + required=True, + explode=True, +) # body param SchemaForRequestBodyApplicationJson = User +request_body_user = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _body_with_query_params_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi index b11af7bfdd1c..ee00de781330 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi @@ -28,6 +28,59 @@ from petstore_api import schemas # noqa: F401 SomeVarSchema = schemas.StrSchema SomeVarSchema = schemas.StrSchema SomeVarSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'someVar': typing.Union[SomeVarSchema, str, ], + 'SomeVar': typing.Union[SomeVarSchema, str, ], + 'some_var': typing.Union[SomeVarSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_some_var = api_client.QueryParameter( + name="someVar", + style=api_client.ParameterStyle.FORM, + schema=SomeVarSchema, + required=True, + explode=True, +) +request_query_some_var2 = api_client.QueryParameter( + name="SomeVar", + style=api_client.ParameterStyle.FORM, + schema=SomeVarSchema, + required=True, + explode=True, +) +request_query_some_var3 = api_client.QueryParameter( + name="some_var", + style=api_client.ParameterStyle.FORM, + schema=SomeVarSchema, + required=True, + explode=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi index 8381fa1a81c4..13329719fd13 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi @@ -29,7 +29,34 @@ from petstore_api.model.client import Client # body param SchemaForRequestBodyApplicationJson = Client + + +request_body_client = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) SchemaFor200ResponseBodyApplicationJson = Client + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi index d7522ad66fb8..b3be2375f8a4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi @@ -26,6 +26,54 @@ from petstore_api import schemas # noqa: F401 # path params IdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'id': typing.Union[IdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_id = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=IdSchema, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, +) class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi index 3ba8d20c2a9c..8098f56eb4ce 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi @@ -28,6 +28,24 @@ from petstore_api import schemas # noqa: F401 from petstore_api.model.health_check_result import HealthCheckResult SchemaFor200ResponseBodyApplicationJson = HealthCheckResult + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi index 9312b60c9d8d..ec6164cf7afe 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi @@ -57,6 +57,27 @@ class SchemaForRequestBodyApplicationJson( ) +request_body_request_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _inline_additional_properties_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi index ef77ebb24581..6fde8960de57 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi @@ -159,6 +159,37 @@ class CompositionInPropertySchema( _configuration=_configuration, **kwargs, ) +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'compositionAtRoot': typing.Union[CompositionAtRootSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + 'compositionInProperty': typing.Union[CompositionInPropertySchema, dict, frozendict.frozendict, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_composition_at_root = api_client.QueryParameter( + name="compositionAtRoot", + style=api_client.ParameterStyle.FORM, + schema=CompositionAtRootSchema, + explode=True, +) +request_query_composition_in_property = api_client.QueryParameter( + name="compositionInProperty", + style=api_client.ParameterStyle.FORM, + schema=CompositionInPropertySchema, + explode=True, +) # body param @@ -295,6 +326,16 @@ class SchemaForRequestBodyMultipartFormData( ) +request_body_any_type = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + 'multipart/form-data': api_client.MediaType( + schema=SchemaForRequestBodyMultipartFormData), + }, +) + + class SchemaFor200ResponseBodyApplicationJson( schemas.ComposedSchema, ): @@ -426,6 +467,27 @@ class SchemaFor200ResponseBodyMultipartFormData( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + SchemaFor200ResponseBodyMultipartFormData, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + 'multipart/form-data': api_client.MediaType( + schema=SchemaFor200ResponseBodyMultipartFormData), + }, +) _all_accept_content_types = ( 'application/json', 'multipart/form-data', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi index 71c3412515e8..149f7c6f44a8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi @@ -95,6 +95,26 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) +request_body_body = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _json_form_data_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi index 65d08b9962d1..923c6123950e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi @@ -31,6 +31,26 @@ from petstore_api.model.json_patch_request import JSONPatchRequest SchemaForRequestBodyApplicationJsonPatchjson = JSONPatchRequest +request_body_json_patch_request = api_client.RequestBody( + content={ + 'application/json-patch+json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJsonPatchjson), + }, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + class BaseApi(api_client.Api): def _json_patch_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi index a2700e06277d..11df6277dcb1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi @@ -27,7 +27,33 @@ from petstore_api import schemas # noqa: F401 # body param SchemaForRequestBodyApplicationJsonCharsetutf8 = schemas.AnyTypeSchema + + +request_body_body = api_client.RequestBody( + content={ + 'application/json; charset=utf-8': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJsonCharsetutf8), + }, +) SchemaFor200ResponseBodyApplicationJsonCharsetutf8 = schemas.AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJsonCharsetutf8, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json; charset=utf-8': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJsonCharsetutf8), + }, +) _all_accept_content_types = ( 'application/json; charset=utf-8', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi index 3933c00010d7..165300b9b10e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi @@ -75,6 +75,42 @@ class MapBeanSchema( _configuration=_configuration, **kwargs, ) +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'mapBean': typing.Union[MapBeanSchema, dict, frozendict.frozendict, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_map_bean = api_client.QueryParameter( + name="mapBean", + style=api_client.ParameterStyle.DEEP_OBJECT, + schema=MapBeanSchema, + explode=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi index f87b6b9b1d0e..15015af7d46d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi @@ -31,26 +31,249 @@ ABSchema = schemas.StrSchema AbSchema = schemas.StrSchema ModelSelfSchema = schemas.StrSchema ABSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + '1': typing.Union[Model1Schema, str, ], + 'aB': typing.Union[ABSchema, str, ], + 'Ab': typing.Union[AbSchema, str, ], + 'self': typing.Union[ModelSelfSchema, str, ], + 'A-B': typing.Union[ABSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query__1 = api_client.QueryParameter( + name="1", + style=api_client.ParameterStyle.FORM, + schema=Model1Schema, + explode=True, +) +request_query_a_b = api_client.QueryParameter( + name="aB", + style=api_client.ParameterStyle.FORM, + schema=ABSchema, + explode=True, +) +request_query_ab = api_client.QueryParameter( + name="Ab", + style=api_client.ParameterStyle.FORM, + schema=AbSchema, + explode=True, +) +request_query__self = api_client.QueryParameter( + name="self", + style=api_client.ParameterStyle.FORM, + schema=ModelSelfSchema, + explode=True, +) +request_query_a_b2 = api_client.QueryParameter( + name="A-B", + style=api_client.ParameterStyle.FORM, + schema=ABSchema, + explode=True, +) # header params Model1Schema = schemas.StrSchema ABSchema = schemas.StrSchema ModelSelfSchema = schemas.StrSchema ABSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + '1': typing.Union[Model1Schema, str, ], + 'aB': typing.Union[ABSchema, str, ], + 'self': typing.Union[ModelSelfSchema, str, ], + 'A-B': typing.Union[ABSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header__2 = api_client.HeaderParameter( + name="1", + style=api_client.ParameterStyle.SIMPLE, + schema=Model1Schema, +) +request_header_a_b3 = api_client.HeaderParameter( + name="aB", + style=api_client.ParameterStyle.SIMPLE, + schema=ABSchema, +) +request_header__self2 = api_client.HeaderParameter( + name="self", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelSelfSchema, +) +request_header_a_b4 = api_client.HeaderParameter( + name="A-B", + style=api_client.ParameterStyle.SIMPLE, + schema=ABSchema, +) # path params Model1Schema = schemas.StrSchema ABSchema = schemas.StrSchema AbSchema = schemas.StrSchema ModelSelfSchema = schemas.StrSchema ABSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + '1': typing.Union[Model1Schema, str, ], + 'aB': typing.Union[ABSchema, str, ], + 'Ab': typing.Union[AbSchema, str, ], + 'self': typing.Union[ModelSelfSchema, str, ], + 'A-B': typing.Union[ABSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__3 = api_client.PathParameter( + name="1", + style=api_client.ParameterStyle.SIMPLE, + schema=Model1Schema, + required=True, +) +request_path_a_b5 = api_client.PathParameter( + name="aB", + style=api_client.ParameterStyle.SIMPLE, + schema=ABSchema, + required=True, +) +request_path_ab2 = api_client.PathParameter( + name="Ab", + style=api_client.ParameterStyle.SIMPLE, + schema=AbSchema, + required=True, +) +request_path__self3 = api_client.PathParameter( + name="self", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelSelfSchema, + required=True, +) +request_path_a_b6 = api_client.PathParameter( + name="A-B", + style=api_client.ParameterStyle.SIMPLE, + schema=ABSchema, + required=True, +) # cookie params Model1Schema = schemas.StrSchema ABSchema = schemas.StrSchema AbSchema = schemas.StrSchema ModelSelfSchema = schemas.StrSchema ABSchema = schemas.StrSchema +RequestRequiredCookieParams = typing_extensions.TypedDict( + 'RequestRequiredCookieParams', + { + } +) +RequestOptionalCookieParams = typing_extensions.TypedDict( + 'RequestOptionalCookieParams', + { + '1': typing.Union[Model1Schema, str, ], + 'aB': typing.Union[ABSchema, str, ], + 'Ab': typing.Union[AbSchema, str, ], + 'self': typing.Union[ModelSelfSchema, str, ], + 'A-B': typing.Union[ABSchema, str, ], + }, + total=False +) + + +class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookieParams): + pass + + +request_cookie__4 = api_client.CookieParameter( + name="1", + style=api_client.ParameterStyle.FORM, + schema=Model1Schema, + explode=True, +) +request_cookie_a_b7 = api_client.CookieParameter( + name="aB", + style=api_client.ParameterStyle.FORM, + schema=ABSchema, + explode=True, +) +request_cookie_ab3 = api_client.CookieParameter( + name="Ab", + style=api_client.ParameterStyle.FORM, + schema=AbSchema, + explode=True, +) +request_cookie__self4 = api_client.CookieParameter( + name="self", + style=api_client.ParameterStyle.FORM, + schema=ModelSelfSchema, + explode=True, +) +request_cookie_a_b8 = api_client.CookieParameter( + name="A-B", + style=api_client.ParameterStyle.FORM, + schema=ABSchema, + explode=True, +) # body param SchemaForRequestBodyApplicationJson = schemas.AnyTypeSchema + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi index e9c082580206..cbb9471b1d15 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi @@ -29,6 +29,30 @@ from petstore_api.model.api_response import ApiResponse # path params PetIdSchema = schemas.Int64Schema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_pet_id = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=PetIdSchema, + required=True, +) # body param @@ -95,7 +119,33 @@ class SchemaForRequestBodyMultipartFormData( _configuration=_configuration, **kwargs, ) + + +request_body_body = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=SchemaForRequestBodyMultipartFormData), + }, +) SchemaFor200ResponseBodyApplicationJson = ApiResponse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi index 272d34c102df..aaa210087b46 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi @@ -28,6 +28,42 @@ from petstore_api.model.foo import Foo # query params MapBeanSchema = Foo +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'mapBean': typing.Union[MapBeanSchema, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_map_bean = api_client.QueryParameter( + name="mapBean", + style=api_client.ParameterStyle.DEEP_OBJECT, + schema=MapBeanSchema, + explode=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi index f0a68485d928..a1284f4e2c15 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi @@ -29,7 +29,33 @@ from petstore_api.model.array_of_enums import ArrayOfEnums # body param SchemaForRequestBodyApplicationJson = ArrayOfEnums + + +request_body_array_of_enums = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) SchemaFor200ResponseBodyApplicationJson = ArrayOfEnums + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi index c0efa3e3939f..d6f240178784 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi @@ -29,7 +29,33 @@ from petstore_api.model.animal_farm import AnimalFarm # body param SchemaForRequestBodyApplicationJson = AnimalFarm + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) SchemaFor200ResponseBodyApplicationJson = AnimalFarm + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi index bb75c710c6a0..4cfdba5afdb3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi @@ -27,7 +27,33 @@ from petstore_api import schemas # noqa: F401 # body param SchemaForRequestBodyApplicationJson = schemas.BoolSchema + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) SchemaFor200ResponseBodyApplicationJson = schemas.BoolSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi index fd0f12aec0c8..6c3978156559 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi @@ -29,7 +29,33 @@ from petstore_api.model.composed_one_of_different_types import ComposedOneOfDiff # body param SchemaForRequestBodyApplicationJson = ComposedOneOfDifferentTypes + + +request_body_composed_one_of_different_types = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) SchemaFor200ResponseBodyApplicationJson = ComposedOneOfDifferentTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi index 29291eef2908..0d6d1861a12a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi @@ -29,7 +29,33 @@ from petstore_api.model.string_enum import StringEnum # body param SchemaForRequestBodyApplicationJson = StringEnum + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) SchemaFor200ResponseBodyApplicationJson = StringEnum + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi index 41062d497f6c..801386b9be69 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi @@ -29,7 +29,34 @@ from petstore_api.model.mammal import Mammal # body param SchemaForRequestBodyApplicationJson = Mammal + + +request_body_mammal = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) SchemaFor200ResponseBodyApplicationJson = Mammal + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi index 570418019641..219cf0af99ce 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi @@ -29,7 +29,33 @@ from petstore_api.model.number_with_validations import NumberWithValidations # body param SchemaForRequestBodyApplicationJson = NumberWithValidations + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) SchemaFor200ResponseBodyApplicationJson = NumberWithValidations + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi index e48de2e5165c..89ca594ad0f8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi @@ -29,7 +29,33 @@ from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefPro # body param SchemaForRequestBodyApplicationJson = ObjectModelWithRefProps + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) SchemaFor200ResponseBodyApplicationJson = ObjectModelWithRefProps + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi index 422e8d0829ea..ca6f8226e068 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi @@ -27,7 +27,33 @@ from petstore_api import schemas # noqa: F401 # body param SchemaForRequestBodyApplicationJson = schemas.StrSchema + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) SchemaFor200ResponseBodyApplicationJson = schemas.StrSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi index 827291c6f8a0..feeb025419c8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi @@ -25,6 +25,25 @@ import frozendict # noqa: F401 from petstore_api import schemas # noqa: F401 + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + schemas.Unset, + schemas.Unset, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType(), + 'application/xml': api_client.MediaType(), + }, +) _all_accept_content_types = ( 'application/json', 'application/xml', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi index 9b7dee9311d8..b91a6db44235 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi @@ -143,6 +143,80 @@ class ContextSchema( def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) RefParamSchema = StringWithValidation +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'pipe': typing.Union[PipeSchema, list, tuple, ], + 'ioutil': typing.Union[IoutilSchema, list, tuple, ], + 'http': typing.Union[HttpSchema, list, tuple, ], + 'url': typing.Union[UrlSchema, list, tuple, ], + 'context': typing.Union[ContextSchema, list, tuple, ], + 'refParam': typing.Union[RefParamSchema, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_pipe = api_client.QueryParameter( + name="pipe", + style=api_client.ParameterStyle.FORM, + schema=PipeSchema, + required=True, + explode=True, +) +request_query_ioutil = api_client.QueryParameter( + name="ioutil", + style=api_client.ParameterStyle.FORM, + schema=IoutilSchema, + required=True, +) +request_query_http = api_client.QueryParameter( + name="http", + style=api_client.ParameterStyle.SPACE_DELIMITED, + schema=HttpSchema, + required=True, +) +request_query_url = api_client.QueryParameter( + name="url", + style=api_client.ParameterStyle.FORM, + schema=UrlSchema, + required=True, +) +request_query_context = api_client.QueryParameter( + name="context", + style=api_client.ParameterStyle.FORM, + schema=ContextSchema, + required=True, + explode=True, +) +request_query_ref_param = api_client.QueryParameter( + name="refParam", + style=api_client.ParameterStyle.FORM, + schema=RefParamSchema, + required=True, + explode=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi index f7825657cdc1..227bdc715fab 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi @@ -27,7 +27,34 @@ from petstore_api import schemas # noqa: F401 # body param SchemaForRequestBodyApplicationOctetStream = schemas.BinarySchema + + +request_body_body = api_client.RequestBody( + content={ + 'application/octet-stream': api_client.MediaType( + schema=SchemaForRequestBodyApplicationOctetStream), + }, + required=True, +) SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationOctetStream, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/octet-stream': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationOctetStream), + }, +) _all_accept_content_types = ( 'application/octet-stream', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi index 515aa163476f..f98b2114af05 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi @@ -93,7 +93,33 @@ class SchemaForRequestBodyMultipartFormData( _configuration=_configuration, **kwargs, ) + + +request_body_body = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=SchemaForRequestBodyMultipartFormData), + }, +) SchemaFor200ResponseBodyApplicationJson = ApiResponse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi index 800be99613d9..e39f47562b6b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi @@ -100,7 +100,33 @@ class SchemaForRequestBodyMultipartFormData( _configuration=_configuration, **kwargs, ) + + +request_body_body = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=SchemaForRequestBodyMultipartFormData), + }, +) SchemaFor200ResponseBodyApplicationJson = ApiResponse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi index 4f7e0cd0856b..8576cd5c0dc6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi @@ -80,6 +80,24 @@ class SchemaFor0ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi index efd25a141722..b9d31131b7bf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi @@ -32,6 +32,41 @@ SchemaForRequestBodyApplicationJson = Pet SchemaForRequestBodyApplicationXml = Pet +request_body_pet = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + 'application/xml': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXml), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + +@dataclass +class ApiResponseFor405(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_405 = api_client.OpenApiResponse( + response_cls=ApiResponseFor405, +) + + class BaseApi(api_client.Api): def _add_pet_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi index eea41d2ad060..b2dea8e66642 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi @@ -32,6 +32,53 @@ SchemaForRequestBodyApplicationJson = Pet SchemaForRequestBodyApplicationXml = Pet +request_body_pet = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + 'application/xml': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXml), + }, + required=True, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) + + +@dataclass +class ApiResponseFor405(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_405 = api_client.OpenApiResponse( + response_cls=ApiResponseFor405, +) + + class BaseApi(api_client.Api): def _update_pet_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi index c626e911a770..d02d4867384d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi @@ -68,6 +68,30 @@ class StatusSchema( def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'status': typing.Union[StatusSchema, list, tuple, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_status = api_client.QueryParameter( + name="status", + style=api_client.ParameterStyle.FORM, + schema=StatusSchema, + required=True, +) class SchemaFor200ResponseBodyApplicationXml( @@ -120,6 +144,39 @@ class SchemaFor200ResponseBodyApplicationJson( def __getitem__(self, i: int) -> 'Pet': return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) _all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi index a4e2c33e5e7a..a56a42656f15 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi @@ -51,6 +51,30 @@ class TagsSchema( def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'tags': typing.Union[TagsSchema, list, tuple, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_tags = api_client.QueryParameter( + name="tags", + style=api_client.ParameterStyle.FORM, + schema=TagsSchema, + required=True, +) class SchemaFor200ResponseBodyApplicationXml( @@ -103,6 +127,39 @@ class SchemaFor200ResponseBodyApplicationJson( def __getitem__(self, i: int) -> 'Pet': return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) _all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi index 821fe2bd79f3..30334cd16365 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi @@ -27,8 +27,67 @@ from petstore_api import schemas # noqa: F401 # header params ApiKeySchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'api_key': typing.Union[ApiKeySchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_api_key = api_client.HeaderParameter( + name="api_key", + style=api_client.ParameterStyle.SIMPLE, + schema=ApiKeySchema, +) # path params PetIdSchema = schemas.Int64Schema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_pet_id = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=PetIdSchema, + required=True, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi index 184adb607d21..9dde67351a2c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi @@ -29,8 +29,77 @@ from petstore_api.model.pet import Pet # path params PetIdSchema = schemas.Int64Schema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_pet_id = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=PetIdSchema, + required=True, +) SchemaFor200ResponseBodyApplicationXml = Pet SchemaFor200ResponseBodyApplicationJson = Pet + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) _all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi index 4a1eee42e7fc..9c1f2854e987 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi @@ -27,6 +27,30 @@ from petstore_api import schemas # noqa: F401 # path params PetIdSchema = schemas.Int64Schema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_pet_id = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=PetIdSchema, + required=True, +) # body param @@ -90,6 +114,26 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) +request_body_body = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, +) + + +@dataclass +class ApiResponseFor405(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_405 = api_client.OpenApiResponse( + response_cls=ApiResponseFor405, +) + + class BaseApi(api_client.Api): def _update_pet_with_form_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi index 08b46e10d87f..9e8f9e23d397 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi @@ -29,6 +29,30 @@ from petstore_api.model.api_response import ApiResponse # path params PetIdSchema = schemas.Int64Schema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_pet_id = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=PetIdSchema, + required=True, +) # body param @@ -90,7 +114,33 @@ class SchemaForRequestBodyMultipartFormData( _configuration=_configuration, **kwargs, ) + + +request_body_body = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=SchemaForRequestBodyMultipartFormData), + }, +) SchemaFor200ResponseBodyApplicationJson = ApiResponse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi index 6ace8ae4e502..01abe22ddb7f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi @@ -54,6 +54,24 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, **kwargs, ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) _all_accept_content_types = ( 'application/json', ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi index 5a0d7684aa17..9950816d21a4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi @@ -29,8 +29,50 @@ from petstore_api.model.order import Order # body param SchemaForRequestBodyApplicationJson = Order + + +request_body_order = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) SchemaFor200ResponseBodyApplicationXml = Order SchemaFor200ResponseBodyApplicationJson = Order + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) _all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi index e4350d629ea0..9cbad562ba31 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi @@ -26,6 +26,54 @@ from petstore_api import schemas # noqa: F401 # path params OrderIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'order_id': typing.Union[OrderIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_order_id = api_client.PathParameter( + name="order_id", + style=api_client.ParameterStyle.SIMPLE, + schema=OrderIdSchema, + required=True, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi index cf9aca7145c5..46d74645bba6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi @@ -34,8 +34,77 @@ class OrderIdSchema( schemas.Int64Schema ): pass +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'order_id': typing.Union[OrderIdSchema, decimal.Decimal, int, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_order_id = api_client.PathParameter( + name="order_id", + style=api_client.ParameterStyle.SIMPLE, + schema=OrderIdSchema, + required=True, +) SchemaFor200ResponseBodyApplicationXml = Order SchemaFor200ResponseBodyApplicationJson = Order + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) _all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi index 171956cf707b..bffc191bc7ba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi @@ -31,6 +31,27 @@ from petstore_api.model.user import User SchemaForRequestBodyApplicationJson = User +request_body_user = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, +) + + class BaseApi(api_client.Api): def _create_user_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi index 19037fd1b366..73b8aaaa7309 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi @@ -56,6 +56,27 @@ class SchemaForRequestBodyApplicationJson( return super().__getitem__(i) +request_body_user = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, +) + + class BaseApi(api_client.Api): def _create_users_with_array_input_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi index 2f2321d85047..84101eb41eda 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi @@ -56,6 +56,27 @@ class SchemaForRequestBodyApplicationJson( return super().__getitem__(i) +request_body_user = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, +) + + class BaseApi(api_client.Api): def _create_users_with_list_input_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi index fb90bd6d3ae8..b7576e01e990 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi @@ -28,10 +28,87 @@ from petstore_api import schemas # noqa: F401 # query params UsernameSchema = schemas.StrSchema PasswordSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'username': typing.Union[UsernameSchema, str, ], + 'password': typing.Union[PasswordSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_username = api_client.QueryParameter( + name="username", + style=api_client.ParameterStyle.FORM, + schema=UsernameSchema, + required=True, + explode=True, +) +request_query_password = api_client.QueryParameter( + name="password", + style=api_client.ParameterStyle.FORM, + schema=PasswordSchema, + required=True, + explode=True, +) XRateLimitSchema = schemas.Int32Schema XExpiresAfterSchema = schemas.DateTimeSchema SchemaFor200ResponseBodyApplicationXml = schemas.StrSchema SchemaFor200ResponseBodyApplicationJson = schemas.StrSchema +ResponseHeadersFor200 = typing_extensions.TypedDict( + 'ResponseHeadersFor200', + { + 'X-Rate-Limit': XRateLimitSchema, + 'X-Expires-After': XExpiresAfterSchema, + } +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: ResponseHeadersFor200 + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, + headers=[ + x_rate_limit_parameter, + x_expires_after_parameter, + ] +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) _all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi index ba8f80388d77..0101a5a6d6c3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi @@ -26,6 +26,18 @@ from petstore_api import schemas # noqa: F401 +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, +) + + class BaseApi(api_client.Api): def _logout_user_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi index 77a7de83384f..ba971087ebbe 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi @@ -26,6 +26,54 @@ from petstore_api import schemas # noqa: F401 # path params UsernameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'username': typing.Union[UsernameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_username = api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=UsernameSchema, + required=True, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) class BaseApi(api_client.Api): diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi index 8096176552b0..a55ad82c543e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi @@ -29,8 +29,77 @@ from petstore_api.model.user import User # path params UsernameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'username': typing.Union[UsernameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_username = api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=UsernameSchema, + required=True, +) SchemaFor200ResponseBodyApplicationXml = User SchemaFor200ResponseBodyApplicationJson = User + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) _all_accept_content_types = ( 'application/xml', 'application/json', diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi index fd208aa80506..ae9a162e0bbb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi @@ -29,10 +29,67 @@ from petstore_api.model.user import User # path params UsernameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'username': typing.Union[UsernameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_username = api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=UsernameSchema, + required=True, +) # body param SchemaForRequestBodyApplicationJson = User +request_body_user = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) + + class BaseApi(api_client.Api): def _update_user_oapg( diff --git a/samples/openapi3/client/petstore/python/petstore_api/schemas.py b/samples/openapi3/client/petstore/python/petstore_api/schemas.py index 5628de732ace..18d0e8c4a5f7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python/petstore_api/schemas.py @@ -1883,6 +1883,7 @@ class ComposedBase(Discriminable): "Invalid inputs given to generate an instance of {}. Multiple " "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) ) + # exactly one class matches return path_to_schemas @classmethod @@ -1947,7 +1948,9 @@ class ComposedBase(Discriminable): ) # process composed schema - discriminator = getattr(cls, 'discriminator', None) + discriminator = None + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): + discriminator = cls.MetaOapg.discriminator() discriminated_cls = None if discriminator and arg and isinstance(arg, frozendict.frozendict): disc_property_name = list(discriminator.keys())[0] diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_from_schema.py b/samples/openapi3/client/petstore/python/test/test_models/test_from_schema.py new file mode 100644 index 000000000000..09cf54a1f6cf --- /dev/null +++ b/samples/openapi3/client/petstore/python/test/test_models/test_from_schema.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import petstore_api +from petstore_api.model.from_schema import FromSchema +from petstore_api import configuration + + +class TestFromSchema(unittest.TestCase): + """FromSchema unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_with_invalid_named_refed_properties.py new file mode 100644 index 000000000000..b4bae2d5e6bc --- /dev/null +++ b/samples/openapi3/client/petstore/python/test/test_models/test_object_with_invalid_named_refed_properties.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import petstore_api +from petstore_api.model.object_with_invalid_named_refed_properties import ObjectWithInvalidNamedRefedProperties +from petstore_api import configuration + + +class TestObjectWithInvalidNamedRefedProperties(unittest.TestCase): + """ObjectWithInvalidNamedRefedProperties unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/__init__.py index 30c8b05d3f63..07334894aa3e 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/__init__.py +++ b/samples/openapi3/client/petstore/python/tests_manual/__init__.py @@ -55,10 +55,11 @@ class ApiTestMixin(unittest.TestCase): content_type: typing.Optional[str] = 'application/json', accept_content_type: typing.Optional[str] = 'application/json', stream: bool = False, + headers: typing.Optional[typing.Dict] = None ): - headers = { - 'User-Agent': cls.user_agent - } + if headers is None: + headers = {} + headers['User-Agent'] = cls.user_agent if accept_content_type: headers['Accept'] = accept_content_type if content_type: diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py new file mode 100644 index 000000000000..fb8cf4a9885b --- /dev/null +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import petstore_api +from petstore_api.model.object_with_invalid_named_refed_properties import ObjectWithInvalidNamedRefedProperties +from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems +from petstore_api.model.from_schema import FromSchema + + +class TestObjectWithInvalidNamedRefedProperties(unittest.TestCase): + """ObjectWithInvalidNamedRefedProperties unit test stubs""" + + def test_instantiation_success(self): + array_value = ArrayWithValidationsInItems( + [4, 5] + ) + from_value = FromSchema(data='abc', id=1) + kwargs = { + 'from': from_value, + '!reference': array_value + } + # __new__ creation works + inst = ObjectWithInvalidNamedRefedProperties( + **kwargs + ) + primitive_data = { + 'from': {'data': 'abc', 'id': 1}, + '!reference': (4, 5) + } + assert inst == primitive_data + # from_openapi_data_oapg works + inst = ObjectWithInvalidNamedRefedProperties.from_openapi_data_oapg(primitive_data) + assert inst == primitive_data + + def test_omitting_required_properties_fails(self): + array_value = ArrayWithValidationsInItems( + [4, 5] + ) + from_value = FromSchema(data='abc', id=1) + with self.assertRaises(petstore_api.exceptions.ApiTypeError): + ObjectWithInvalidNamedRefedProperties( + **{ + 'from': from_value, + } + ) + with self.assertRaises(petstore_api.exceptions.ApiTypeError): + ObjectWithInvalidNamedRefedProperties( + **{ + '!reference': array_value + } + ) + with self.assertRaises(petstore_api.exceptions.ApiTypeError): + ObjectWithInvalidNamedRefedProperties.from_openapi_data_oapg( + { + 'from': {'data': 'abc', 'id': 1}, + } + ) + with self.assertRaises(petstore_api.exceptions.ApiTypeError): + ObjectWithInvalidNamedRefedProperties.from_openapi_data_oapg( + { + '!reference': [4, 5] + } + ) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py new file mode 100644 index 000000000000..c105f631b077 --- /dev/null +++ b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import json +import unittest +from unittest.mock import patch + +import urllib3 + +from petstore_api.paths.pet_pet_id import get # noqa: E501 +from petstore_api import configuration, schemas, api_client +from petstore_api.model.pet import Pet + +from ... import ApiTestMixin + + +class TestPetPetId(ApiTestMixin, unittest.TestCase): + """ + PetPetId unit test stubs + Find pet by ID # noqa: E501 + """ + def test_get(self): + config_with_auth = configuration.Configuration(api_key={'api_key': 'someKey'}) + used_api_client = api_client.ApiClient(configuration=config_with_auth) + api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + with patch.object(urllib3.PoolManager, 'request') as mock_request: + response_json = { + 'photoUrls': [], + 'name': 'Kitty', + 'id': 1, + 'category': { + 'name': 'Cat', + 'id': 1 + }, + 'tags': [], + 'status': 'available' + } + body = self.json_bytes(response_json) + mock_request.return_value = self.response(body) + + api_response = api.get(path_params={'petId': 1}) + self.assert_pool_manager_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/pet/1', + body=None, + method='GET', + content_type=None, + accept_content_type='application/xml, application/json', + headers={'api_key': 'someKey'} + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, Pet) + assert isinstance(api_response.headers, schemas.Unset) + assert api_response.response.status == 200 + + + + + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main()